Mercurial > p > roundup > code
comparison roundup/admin.py @ 7754:09b216591db5
fix: overeager cleanup
I was cleaning some dregs and removed a required line after I
completed testing 8-(.
Added a 'make check' that runs ruff with the test that finds the
undefined variable.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Fri, 01 Mar 2024 15:13:36 -0500 |
| parents | b2dbab2b34bc |
| children | 417c8ddc98ac |
comparison
equal
deleted
inserted
replaced
| 7753:ce04a489312e | 7754:09b216591db5 |
|---|---|
| 20 """Administration commands for maintaining Roundup trackers. | 20 """Administration commands for maintaining Roundup trackers. |
| 21 """ | 21 """ |
| 22 from __future__ import print_function | 22 from __future__ import print_function |
| 23 | 23 |
| 24 __docformat__ = 'restructuredtext' | 24 __docformat__ = 'restructuredtext' |
| 25 | |
| 26 import csv | 25 import csv |
| 27 import getopt | 26 import getopt |
| 28 import getpass | 27 import getpass |
| 29 import operator | 28 import operator |
| 30 import os | 29 import os |
| 876 except hyperdb.DesignatorError as message: | 875 except hyperdb.DesignatorError as message: |
| 877 raise UsageError(message) | 876 raise UsageError(message) |
| 878 | 877 |
| 879 # get the class | 878 # get the class |
| 880 cl = self.get_class(classname) | 879 cl = self.get_class(classname) |
| 880 prop_obj = properties[propname] | |
| 881 try: | 881 try: |
| 882 if not (self.separator or self.print_designator): | 882 if not (self.separator or self.print_designator): |
| 883 print(cl.get(nodeid, propname)) | 883 print(cl.get(nodeid, propname)) |
| 884 continue | 884 continue |
| 885 | 885 |
| 1546 self.settings['_retired_val'] = False | 1546 self.settings['_retired_val'] = False |
| 1547 else: | 1547 else: |
| 1548 raise UsageError(_('Internal error: pragma can not handle ' | 1548 raise UsageError(_('Internal error: pragma can not handle ' |
| 1549 'values of type: %s') % | 1549 'values of type: %s') % |
| 1550 type(self.settings[setting]).__name__) | 1550 type(self.settings[setting]).__name__) |
| 1551 | |
| 1552 self.settings[setting] = value | 1551 self.settings[setting] = value |
| 1553 | 1552 |
| 1554 designator_re = re.compile('([A-Za-z]+)([0-9]+)$') | 1553 designator_re = re.compile('([A-Za-z]+)([0-9]+)$') |
| 1555 designator_rng = re.compile('([A-Za-z]+):([0-9]+)-([0-9]+)$') | 1554 designator_rng = re.compile('([A-Za-z]+):([0-9]+)-([0-9]+)$') |
| 1556 | 1555 |
