This repository has been archived by the owner on Apr 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ca4f8a0
commit 7d63b8e
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -252,7 +252,7 @@ def __init__(self, devices_info, server_name=None, instance_name=None, | |
if not instance_name: | ||
instance_name = server_name.lower() | ||
if db is None: | ||
_, db = tempfile.mkstemp() | ||
handle, db = tempfile.mkstemp() | ||
if host is None: | ||
# IP address is used instead of the hostname on purpose (see #246) | ||
host = get_host_ip() | ||
|
@@ -262,6 +262,7 @@ def __init__(self, devices_info, server_name=None, instance_name=None, | |
if process: | ||
os.environ['ORBscanGranularity'] = '0' | ||
# Attributes | ||
self.handle = handle | ||
This comment has been minimized.
Sorry, something went wrong. |
||
self.db = db | ||
self.host = host | ||
self.port = port | ||
|
@@ -283,6 +284,7 @@ def __init__(self, devices_info, server_name=None, instance_name=None, | |
device_cls, device = _device_class_from_field(device_info["class"]) | ||
tangoclass = device.__name__ | ||
if tangoclass in tangoclass_list: | ||
os.close(self.handle) | ||
os.unlink(self.db) | ||
This comment has been minimized.
Sorry, something went wrong.
ajoubertza
Member
|
||
raise ValueError("multiple entries in devices_info pointing " | ||
"to the same Tango class") | ||
|
@@ -297,6 +299,7 @@ def __init__(self, devices_info, server_name=None, instance_name=None, | |
|
||
# Target and arguments | ||
if class_list and device_list: | ||
os.close(self.handle) | ||
os.unlink(self.db) | ||
raise ValueError("mixing HLAPI and classical API in devices_info " | ||
"is not supported") | ||
|
handle
might be undefined ifdb
was passed in.