[pytango] 24/483: removed pyflakes warnings

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit 5188b1238a4c532a7e4d56c53a7dfed6435ce4ec
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Tue Apr 26 14:37:44 2011 +0000

    removed pyflakes warnings
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@16653 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 Makefile                         |  3 ++-
 PyTango/__init__.py              |  5 ++---
 PyTango/attribute_proxy.py       |  7 +++----
 PyTango/base_types.py            |  2 +-
 PyTango/callback.py              |  3 ---
 PyTango/connection.py            | 10 +++++-----
 PyTango/db.py                    |  2 +-
 PyTango/device_attribute.py      |  1 -
 PyTango/device_class.py          |  7 +++----
 PyTango/device_proxy.py          |  7 ++-----
 PyTango/device_server.py         |  4 ----
 PyTango/encoded_attribute.py     | 13 ++++++-------
 PyTango/group.py                 |  3 ---
 PyTango/group_element.py         |  1 -
 PyTango/group_reply_list.py      |  1 -
 PyTango/ipython/ipy_qt.py        |  3 ---
 PyTango/ipython/ipython.py       | 28 +++++++++++++++-------------
 PyTango/ipython/ipython_00_10.py | 17 +++++------------
 PyTango/log4tango.py             |  4 ++--
 PyTango/pytango_pprint.py        | 28 ++++++++++++++++++++++------
 PyTango/pyutil.py                |  1 -
 PyTango/release.py               |  2 +-
 PyTango/utils.py                 | 12 ++++++------
 cPyTango/cPyTango.py             |  9 ++++-----
 setup.py                         |  5 -----
 25 files changed, 80 insertions(+), 98 deletions(-)

diff --git a/Makefile b/Makefile
index 85e1863..5d80c60 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,7 @@ OBJS_DIR = objs
 endif
 
 CC = gcc
-CCFLAGS = -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC $(INCLUDE_DIRS)
+CCFLAGS = -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O0 -Wall -fPIC $(INCLUDE_DIRS)
 
 LN = g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
 LN_VER = -Wl,-h -Wl,--strip-all
@@ -195,5 +195,6 @@ clean:
 	rm -rf $(OBJS_DIR)
 
 install: build
+	mkdir -p $(prefix)
 	rsync -r PyTango $(prefix)
 	rsync $(OBJS_DIR)/$(LIBNAME) $(prefix)/PyTango
diff --git a/PyTango/__init__.py b/PyTango/__init__.py
index bde97ac..4f89022 100644
--- a/PyTango/__init__.py
+++ b/PyTango/__init__.py
@@ -31,7 +31,6 @@ http://www.tango-controls.org/static/PyTango/latest/doc/html/index.html
 __docformat__ = "restructuredtext"
 
 try:
-    import time
     from _PyTango import *
 except ImportError, ie:
     if not ie.args[0].count("_PyTango"):
@@ -48,14 +47,14 @@ except ImportError, ie:
 
 ArgType = _PyTango.CmdArgType
 
-from release import *
+from release import Release
 
 __author__ = "\n".join([ "%s <%s>" % x for x in Release.authors.values()])
 __version_info__ = Release.version_info
 __version__ = Release.version
 __version_long__ = Release.version_long
 __version_number__ = Release.version_number
-__version_description__  = Release.version_description
+__version_description__ = Release.version_description
 __doc__ = Release.long_description
 
 import pytango_init
diff --git a/PyTango/attribute_proxy.py b/PyTango/attribute_proxy.py
index 5569faf..1334558 100644
--- a/PyTango/attribute_proxy.py
+++ b/PyTango/attribute_proxy.py
@@ -38,12 +38,11 @@ import types
 
 from _PyTango import StdStringVector
 from _PyTango import DbData, DbDatum
-from PyTango.utils import seq_2_StdStringVector, StdStringVector_2_seq
+from PyTango.utils import seq_2_StdStringVector
 from PyTango.utils import seq_2_DbData, DbData_2_dict
-from utils import document_method as __document_method
 
-from _PyTango import    __AttributeProxy as _AttributeProxy,         \
-                        DeviceProxy
+from _PyTango import __AttributeProxy as _AttributeProxy
+from _PyTango import DeviceProxy
 
 def __AttributeProxy__get_property(self, propname, value=None):
     """
diff --git a/PyTango/base_types.py b/PyTango/base_types.py
index 9a0a439..b68b12b 100644
--- a/PyTango/base_types.py
+++ b/PyTango/base_types.py
@@ -32,7 +32,7 @@ __docformat__ = "restructuredtext"
 import operator
 
 from _PyTango import *
-from utils import document_method, document_static_method
+from utils import document_method
 from utils import document_enum as __document_enum
 
 def __StdVector__add(self, seq):
diff --git a/PyTango/callback.py b/PyTango/callback.py
index 491c694..275e2e4 100644
--- a/PyTango/callback.py
+++ b/PyTango/callback.py
@@ -30,9 +30,6 @@ __all__ = []
 __docformat__ = "restructuredtext"
 
 from _PyTango import CmdDoneEvent, AttrReadEvent, AttrWrittenEvent
-# __CallBackAutoDie, __CallBackPushEvent
-from utils import document_method as __document_method
-
 
 def __init_Callback():
     pass
diff --git a/PyTango/connection.py b/PyTango/connection.py
index 2220b9c..85a06cc 100644
--- a/PyTango/connection.py
+++ b/PyTango/connection.py
@@ -36,7 +36,7 @@ from utils import document_method as __document_method
 from utils import document_static_method as __document_static_method
 import operator
 
-def __CallBackAutoDie__cmd_ended_aux(fn):
+def __CallBackAutoDie__cmd_ended_aux(self, fn):
     def __new_fn(cmd_done_event):
         try:
             cmd_done_event.argout = cmd_done_event.argout_raw.extract(
@@ -167,12 +167,12 @@ def __Connection__command_inout_asynch(self, cmd_name, *args):
     elif len(args) == 1:
         if callable(args[0]): # command_inout_asynch(lambda)
             cb = __CallBackAutoDie()
-            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(args[0])
+            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(self, args[0])
             argin = __get_command_inout_param(self, cmd_name)
             return self.__command_inout_asynch_cb(cmd_name, argin, cb)
         elif hasattr(args[0], 'cmd_ended'): # command_inout_asynch(Cbclass)
             cb = __CallBackAutoDie()
-            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(args[0].cmd_ended)
+            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(self, args[0].cmd_ended)
             argin = __get_command_inout_param(self, cmd_name)
             return self.__command_inout_asynch_cb(cmd_name, argin, cb)
         else: # command_inout_asynch(value)
@@ -182,12 +182,12 @@ def __Connection__command_inout_asynch(self, cmd_name, *args):
     elif len(args) == 2:
         if callable(args[1]): #command_inout_asynch( value, lambda)
             cb = __CallBackAutoDie()
-            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(args[1])
+            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(self, args[1])
             argin = __get_command_inout_param(self, cmd_name, args[0])
             return self.__command_inout_asynch_cb(cmd_name, argin, cb)
         elif hasattr(args[1], 'cmd_ended'): #command_inout_asynch(value, cbClass)
             cb = __CallBackAutoDie()
-            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(args[1].cmd_ended)
+            cb.cmd_ended = __CallBackAutoDie__cmd_ended_aux(self, args[1].cmd_ended)
             argin = __get_command_inout_param(self, cmd_name, args[0])
             return self.__command_inout_asynch_cb(cmd_name, argin, cb)
         else: # command_inout_asynch(value, forget)
diff --git a/PyTango/db.py b/PyTango/db.py
index 90a5138..38a2677 100644
--- a/PyTango/db.py
+++ b/PyTango/db.py
@@ -36,7 +36,7 @@ from _PyTango import StdStringVector
 from _PyTango import Database, DbDatum, DbData
 from _PyTango import DbDevInfo, DbDevInfos
 from _PyTango import DbDevImportInfo, DbDevExportInfo
-from _PyTango import DbDevImportInfos, DbDevExportInfos
+from _PyTango import DbDevExportInfos
 from _PyTango import DbHistory, DbServerInfo
 
 from utils import seq_2_StdStringVector
diff --git a/PyTango/device_attribute.py b/PyTango/device_attribute.py
index d23429f..97ae59f 100644
--- a/PyTango/device_attribute.py
+++ b/PyTango/device_attribute.py
@@ -32,7 +32,6 @@ __docformat__ = "restructuredtext"
 import copy
 
 from utils import document_method as __document_method
-from utils import document_enum as __document_enum
 from _PyTango import DeviceAttribute, ExtractAs
 
 def __DeviceAttribute__get_data(self):
diff --git a/PyTango/device_class.py b/PyTango/device_class.py
index d171717..f09f8df 100644
--- a/PyTango/device_class.py
+++ b/PyTango/device_class.py
@@ -29,7 +29,6 @@ __all__ = [ "DeviceClass" ]
 
 __docformat__ = "restructuredtext"
 
-import sys
 import types
 import operator
 
@@ -40,11 +39,11 @@ from _PyTango import UserDefaultAttrProp
 
 from pyutil import Util
 
-from utils import DbData_2_dict, seqStr_2_obj, obj_2_str, is_array
+from utils import seqStr_2_obj, obj_2_str, is_array
 from utils import document_method as __document_method
 
-from globals import get_classes, get_class, get_class_by_class
-from globals import get_constructed_classes, get_constructed_class, get_constructed_class_by_class
+from globals import get_class, get_class_by_class
+from globals import get_constructed_class_by_class
 
 class PropUtil:
     """An internal Property util class"""
diff --git a/PyTango/device_proxy.py b/PyTango/device_proxy.py
index ed0f778..179005e 100644
--- a/PyTango/device_proxy.py
+++ b/PyTango/device_proxy.py
@@ -26,20 +26,17 @@ This is an internal PyTango module.
 """
 
 __all__ = []
-            
+
 __docformat__ = "restructuredtext"
 
-import sys
 import operator
 import types
-import threading
-import traceback
 
 from _PyTango import StdStringVector
 from _PyTango import DbData, DbDatum
 from _PyTango import AttributeInfo, AttributeInfoEx
 from _PyTango import AttributeInfoList, AttributeInfoListEx
-from _PyTango import DeviceProxy, DeviceAttribute, DeviceData
+from _PyTango import DeviceProxy
 from _PyTango import __CallBackAutoDie, __CallBackPushEvent, EventType
 from _PyTango import DevFailed
 from _PyTango import ExtractAs
diff --git a/PyTango/device_server.py b/PyTango/device_server.py
index 33201c2..81489d1 100644
--- a/PyTango/device_server.py
+++ b/PyTango/device_server.py
@@ -32,11 +32,8 @@ __all__ = [ "ChangeEventProp", "PeriodicEventProp", "ArchiveEventProp",
 __docformat__ = "restructuredtext"
 
 import copy
-import operator
-import types
 
 import _PyTango
-from _PyTango import StdStringVector, StdDoubleVector
 from _PyTango import DeviceImpl, Device_3Impl, Device_4Impl
 from _PyTango import Attribute, WAttribute, MultiAttribute
 from _PyTango import Attr
@@ -44,7 +41,6 @@ from _PyTango import Logger
 from _PyTango import AttrWriteType, AttrDataFormat, DispLevel
 from _PyTango import UserDefaultAttrProp
 
-from utils import seq_2_StdStringVector, seq_2_StdDoubleVector
 from utils import document_method as __document_method
 from utils import copy_doc
 
diff --git a/PyTango/encoded_attribute.py b/PyTango/encoded_attribute.py
index 5d751dc..236fe99 100644
--- a/PyTango/encoded_attribute.py
+++ b/PyTango/encoded_attribute.py
@@ -32,16 +32,15 @@ __docformat__ = "restructuredtext"
 import types
 import operator
 
-from _PyTango import Except
 from _PyTango import EncodedAttribute
 from _PyTango import ExtractAs
 from _PyTango import _ImageFormat
-from utils import document_method as __document_method
 
 try:
     import numpy
+    np = numpy
 except:
-    numpy = None
+    np = None
 
 _allowed_extract = ExtractAs.Numpy, ExtractAs.String, ExtractAs.Tuple, \
                    ExtractAs.List, ExtractAs.PyTango3
@@ -130,7 +129,7 @@ def __EncodedAttribute_generic_encode_gray8(self, gray8, width=0, height=0, qual
             raise ValueError("When giving a string as data, you must also "
                              "supply width and height")
     
-    if numpy and isinstance(gray8, numpy.ndarray):
+    if np and isinstance(gray8, np.ndarray):
         if gray8.ndim != 2:
             if not width or not height:
                 raise ValueError("When giving a non 2D numpy array, width and "
@@ -206,7 +205,7 @@ def __EncodedAttribute_encode_gray16(self, gray16, width=0, height=0):
             raise ValueError("When giving a string as data, you must also "
                              "supply width and height")
     
-    if numpy and isinstance(gray16, numpy.ndarray):
+    if np and isinstance(gray16, np.ndarray):
         if gray16.ndim != 2:
             if not width or not height:
                 raise ValueError("When giving a non 2D numpy array, width and "
@@ -325,7 +324,7 @@ def __EncodedAttribute_generic_encode_rgb24(self, rgb24, width=0, height=0, qual
             raise ValueError("When giving a string as data, you must also "
                              "supply width and height")
     
-    if numpy and isinstance(rgb24, numpy.ndarray):
+    if np and isinstance(rgb24, np.ndarray):
         if rgb24.ndim != 3:
             if not width or not height:
                 raise ValueError("When giving a non 2D numpy array, width and "
@@ -401,7 +400,7 @@ def __EncodedAttribute_encode_jpeg_rgb32(self, rgb32, width=0, height=0, quality
             raise ValueError("When giving a string as data, you must also "
                              "supply width and height")
     
-    if numpy and isinstance(rgb32, numpy.ndarray):
+    if np and isinstance(rgb32, np.ndarray):
         if rgb32.ndim != 2:
             if not width or not height:
                 raise ValueError("When giving a non 2D numpy array, width and "
diff --git a/PyTango/group.py b/PyTango/group.py
index f3a224a..fd46e6e 100644
--- a/PyTango/group.py
+++ b/PyTango/group.py
@@ -29,9 +29,6 @@ __all__ = [ "Group" ]
 
 __docformat__ = "restructuredtext"
 
-import operator
-import types
-
 from _PyTango import __Group as _RealGroup, GroupElement
 from utils import document_method as __document_method
 
diff --git a/PyTango/group_element.py b/PyTango/group_element.py
index f79f8c1..a5dd2fc 100644
--- a/PyTango/group_element.py
+++ b/PyTango/group_element.py
@@ -30,7 +30,6 @@ __all__ = []
 __docformat__ = "restructuredtext"
 
 import operator
-import types
 
 from _PyTango import StdStringVector
 from _PyTango import GroupElement
diff --git a/PyTango/group_reply_list.py b/PyTango/group_reply_list.py
index 261809a..37fa3c8 100644
--- a/PyTango/group_reply_list.py
+++ b/PyTango/group_reply_list.py
@@ -29,7 +29,6 @@ __all__ = []
 
 __docformat__ = "restructuredtext"
 
-from utils import document_method as __document_method
 from _PyTango import GroupReplyList
 from _PyTango import GroupCmdReplyList
 from _PyTango import GroupAttrReplyList
diff --git a/PyTango/ipython/ipy_qt.py b/PyTango/ipython/ipy_qt.py
index 11c5144..5485fcf 100644
--- a/PyTango/ipython/ipy_qt.py
+++ b/PyTango/ipython/ipy_qt.py
@@ -21,10 +21,7 @@
 ##
 ################################################################################
 
-import operator
 import logging
-import time
-import datetime
 import PyTango
 import PyQt4.Qt as Qt
 
diff --git a/PyTango/ipython/ipython.py b/PyTango/ipython/ipython.py
index 5ff0b49..f974030 100644
--- a/PyTango/ipython/ipython.py
+++ b/PyTango/ipython/ipython.py
@@ -21,24 +21,27 @@
 ##
 ################################################################################
 
+import os
+
 try:
     import IPython
+    ipython = IPython
 except:
-    IPython = None
+    ipython = None
 
 def get_ipython_version():
     """Returns the current IPython version"""
-    if IPython is None:return None
+    if ipython is None:return None
     v = None
     try:
         try:
-            v = IPython.Release.version
-        except Exception, e1:
+            v = ipython.Release.version
+        except Exception:
             try:
-                v = IPython.release.version
-            except Exception, e2:
+                v = ipython.release.version
+            except Exception:
                 pass
-    except Exception, e3:
+    except Exception:
         pass
     return v
 
@@ -63,14 +66,13 @@ def __define_init():
 
 def get_ipython_dir():
     """Find the ipython local directory. Usually is <home>/.ipython"""
-    if hasattr(IPython.iplib, 'get_ipython_dir'):
+    if hasattr(ipython.iplib, 'get_ipython_dir'):
         # Starting from ipython 0.9 they hadded this method
-        return IPython.iplib.get_ipython_dir()
+        return ipython.iplib.get_ipython_dir()
     
     # Try to find the profile in the current directory and then in the 
     # default IPython dir
-    userdir = os.path.realpath(os.path.curdir)
-    home_dir = IPython.genutils.get_home_dir()
+    home_dir = ipython.genutils.get_home_dir()
     
     if os.name == 'posix':
         ipdir = '.ipython'
@@ -85,10 +87,10 @@ def get_ipython_profiles():
     ret = []
     ipydir = get_ipython_dir()
     if os.path.isdir(ipydir):
-        for i in os.listdir(ipdir):
+        for i in os.listdir(ipydir):
             if i.startswith("ipy_profile_") and i.endswith(".py") and \
                 os.path.isfile(i):
-                ret.append(i[len("ipy_profile_"):s.rfind(".")])
+                ret.append(i[len("ipy_profile_"):i.rfind(".")])
     return ret
 
 init_ipython = __define_init()
diff --git a/PyTango/ipython/ipython_00_10.py b/PyTango/ipython/ipython_00_10.py
index 791831b..d2e2074 100644
--- a/PyTango/ipython/ipython_00_10.py
+++ b/PyTango/ipython/ipython_00_10.py
@@ -27,11 +27,7 @@
 
 import sys
 import os
-import token
-import tokenize
-import copy
 import re
-import operator
 import StringIO
 import textwrap
 import IPython.ipapi
@@ -559,8 +555,8 @@ def __get_db(host_port=None):
             db = PyTango.Database(*host_port.split(":"))
             
             ip.user_ns["DB_NAME"] = host_port
-        except Exception, e:
-            print 
+        except Exception:
+            print
             if db:
                 print "Could not access Database", host_port
                 old_host_port = "%s:%s" % (db.get_db_host(), db.get_db_port())
@@ -612,12 +608,12 @@ def __get_ipython_version():
     try:
         try:
             v = IPython.Release.version
-        except Exception, e1:
+        except Exception:
             try:
                 v = IPython.release.version
-            except Exception, e2:
+            except Exception:
                 pass
-    except Exception, e3:
+    except Exception:
         pass
     return v
 
@@ -645,7 +641,6 @@ def __build_color_scheme(ip, name):
     
     # make some schemes as instances so we can copy them for modification easily:
     ColorANSI = IPython.ColorANSI
-    ColorScheme = ColorANSI.ColorScheme
     InputColors = ColorANSI.InputTermColors
     TermColors = ColorANSI.TermColors
     PromptColors = IPython.Prompts.PromptColors
@@ -712,7 +707,6 @@ def __store(ip, var):
 
 def init_colors(ip):
     ColorANSI = IPython.ColorANSI
-    ColorScheme = ColorANSI.ColorScheme
     InputColors = ColorANSI.InputTermColors
     TermColors = ColorANSI.TermColors
     
@@ -750,7 +744,6 @@ def init_colors(ip):
 
 def init_pytango(ip):
     """Initializes the IPython environment with PyTango elements"""
-    TermColors = IPython.ColorANSI.TermColors
 
     # export symbols to IPython namepspace
     ip.ex("import PyTango")
diff --git a/PyTango/log4tango.py b/PyTango/log4tango.py
index 61da3bf..f7f4102 100644
--- a/PyTango/log4tango.py
+++ b/PyTango/log4tango.py
@@ -112,8 +112,8 @@ class LogIt(object):
 
     def __compact_dict(self, k, v, maxlen=None):
         if maxlen is None:
-            return "%s=%s" % (k, __compact(v))
-        return "%s=%s" % (k, __compact(v, maxlen=maxlen))
+            return "%s=%s" % (k, self.__compact(v))
+        return "%s=%s" % (k, self.__compact(v, maxlen=maxlen))
 
     def is_enabled(self, d):
         return d.get_logger().is_debug_enabled()
diff --git a/PyTango/pytango_pprint.py b/PyTango/pytango_pprint.py
index 6e24f66..c39f07f 100644
--- a/PyTango/pytango_pprint.py
+++ b/PyTango/pytango_pprint.py
@@ -29,11 +29,29 @@ __all__ = []
 
 __docformat__ = "restructuredtext"
 
-from _PyTango import *
+import operator
 
-from device_server import AttributeAlarm, EventProperties
-from device_server import ChangeEventProp, PeriodicEventProp, ArchiveEventProp
-from device_server import AttributeConfig, AttributeConfig_2, AttributeConfig_3
+from _PyTango import (StdStringVector, StdLongVector, CommandInfoList,
+    AttributeInfoList, AttributeInfoListEx,
+    DeviceDataHistoryList,
+    GroupReplyList, GroupAttrReplyList, GroupCmdReplyList,
+    DbData, DbDevInfos, DbDevExportInfos, DbDevImportInfos, DbHistoryList,
+    LockerInfo, DevCommandInfo, AttributeDimension, CommandInfo,
+    DeviceInfo, DeviceAttributeConfig, AttributeInfo, AttributeAlarmInfo,
+    ChangeEventInfo, PeriodicEventInfo, ArchiveEventInfo,
+    AttributeEventInfo, AttributeInfoEx,
+    DeviceAttribute, DeviceAttributeHistory, DeviceData, DeviceDataHistory,
+    DbDatum, DbDevInfo, DbDevImportInfo, DbDevExportInfo, DbServerInfo,
+    GroupElement, GroupReply, GroupAttrReply, GroupCmdReply,
+    DevError, EventData, AttrConfEventData, DataReadyEventData,
+    AttributeConfig, AttributeConfig_2, AttributeConfig_3,
+    ChangeEventProp, PeriodicEventProp, ArchiveEventProp,
+    AttributeAlarm, EventProperties,
+    TimeVal, DevFailed, CmdArgType)
+
+#from device_server import AttributeAlarm, EventProperties
+#from device_server import ChangeEventProp, PeriodicEventProp, ArchiveEventProp
+#from device_server import AttributeConfig, AttributeConfig_2, AttributeConfig_3
 
 def __inc_param(obj, name):
     ret  = not name.startswith('_')
@@ -91,8 +109,6 @@ def __registerSeqStr():
         seq.__str__ = _SeqStr
         seq.__repr__ = _SeqRepr
 
-import operator
-
 def __str__DevFailed(self):
     if operator.isSequenceType(self.args):
         return 'DevFailed[\n%s]' % '\n'.join(map(str,self.args))
diff --git a/PyTango/pyutil.py b/PyTango/pyutil.py
index df4ccca..8ead49f 100644
--- a/PyTango/pyutil.py
+++ b/PyTango/pyutil.py
@@ -31,7 +31,6 @@ __docformat__ = "restructuredtext"
 
 import os
 import copy
-import operator
 
 from _PyTango import _Util, Except, DevFailed, DbDevInfo
 from utils import document_method as __document_method
diff --git a/PyTango/release.py b/PyTango/release.py
index 99f8f77..96584d9 100644
--- a/PyTango/release.py
+++ b/PyTango/release.py
@@ -47,7 +47,7 @@ class Release:
             - keywords : (seq<str>) list of keywords
             - license : (str) the license"""
     name = 'PyTango'
-    version_info = (7, 2, 0, 'final', 0)
+    version_info = (7, 2, 1, 'dev', 0)
     version = '.'.join(map(str, version_info[:3]))
     version_long = version + ''.join(map(str, version_info[3:]))
     version_description = 'This version implements the C++ Tango 7.2 API.'
diff --git a/PyTango/utils.py b/PyTango/utils.py
index 475b7e5..15c96ac 100644
--- a/PyTango/utils.py
+++ b/PyTango/utils.py
@@ -40,9 +40,9 @@ import socket
 import types
 import operator
 
-from _PyTango import StdStringVector, DbData, DbDevInfos, DbDevExportInfos, CmdArgType, AttrDataFormat
+from _PyTango import StdStringVector, StdDoubleVector
+from _PyTango import DbData, DbDevInfos, DbDevExportInfos, CmdArgType, AttrDataFormat
 from _PyTango import EventData, AttrConfEventData, DataReadyEventData
-from _PyTango import ApiUtil
 
 _scalar_int_types = (CmdArgType.DevShort, CmdArgType.DevUShort,
     CmdArgType.DevInt, CmdArgType.DevLong, CmdArgType.DevULong,
@@ -246,7 +246,7 @@ def StdDoubleVector_2_seq(vec, seq=None):
     if seq is None: seq = []
     if not isinstance(vec, StdDoubleVector):
         raise TypeError('vec must be a PyTango.StdDoubleVector')
-    for e in vec: sec.append(float(e))
+    for e in vec: seq.append(float(e))
     return seq
 
 def seq_2_DbDevInfos(seq, vec=None):
@@ -759,20 +759,20 @@ def _notifd2db_real_db(ior_string, host=None, out=sys.stdout):
     num_retries = 3
     while num_retries > 0:
         try:
-            ret = db.command_inout("DbExportEvent", args)
+            db.command_inout("DbExportEvent", args)
             print >>out, "Successfully exported notification service event " \
                          "factory for host", host_name, "to Tango database !"
             break
         except PyTango.CommunicationFailed, cf:
             if len(cf.errors) >= 2:
-                if e.errors[1].reason == "API_DeviceTimedOut":
+                if cf.errors[1].reason == "API_DeviceTimedOut":
                     if num_retries > 0:
                         num_retries -= 1
                 else:
                     num_retries = 0
             else:
                 num_retries = 0
-        except Exception, e:
+        except Exception:
             num_retries = 0
     
     if num_retries == 0:
diff --git a/cPyTango/cPyTango.py b/cPyTango/cPyTango.py
index 7e59680..05e6fad 100644
--- a/cPyTango/cPyTango.py
+++ b/cPyTango/cPyTango.py
@@ -23,14 +23,13 @@
 
 import ctypes
 import ctypes.util
-import atexit
 import enumeration
 import time
 
 _tango_lib_name = ctypes.util.find_library("c_tango")
 
 if _tango_lib_name is None:
-    raise RuntimeException("Failed to find c_tango shared library")
+    raise RuntimeError("Failed to find c_tango shared library")
 
 _ref      = ctypes.byref
 String    = ctypes.c_char_p
@@ -246,8 +245,8 @@ class VarStringArray(VarArray):
         l = self.length
         if l == 1:
             return self.sequence[0]
-        return str(list(seq[:10]))
-VarStringArrayPtr = ctypes.POINTER(VarStringArray)        
+        return str(list(self.sequence[:10]))
+VarStringArrayPtr = ctypes.POINTER(VarStringArray)
 
 class VarStateArray(VarArray):
     _fields_ = \
@@ -258,7 +257,7 @@ class VarStateArray(VarArray):
         l = self.length
         if l == 1:
             return TangoDevStateEnum.whatis(self.sequence[0])
-        return map(cPyTango.TangoDevStateEnum.whatis, seq[:10])
+        return map(TangoDevStateEnum.whatis, self.sequence[:10])
         
 
 class TangoAttributeData(ctypes.Union):
diff --git a/setup.py b/setup.py
index 353e62e..665eb83 100644
--- a/setup.py
+++ b/setup.py
@@ -23,15 +23,10 @@
 
 import os
 import sys
-import errno
 import platform
-import copy
-import shutil
 import imp
-import StringIO
 
 from distutils.core import setup, Extension
-from distutils.dist import Distribution
 import distutils.sysconfig
 
 try:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list