diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-11 07:46:22 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-11 07:46:22 -0400 |
commit | f87355fddc2a931e3f984d074a713f4313d5f709 (patch) | |
tree | 4c217b7a2b9867c74e8f0f5bd1d05180cbbc6e90 /becommands | |
parent | 4038e118782113b404f0995e3c919d6e58195c22 (diff) | |
download | bugseverywhere-f87355fddc2a931e3f984d074a713f4313d5f709.tar.gz |
Adjustments to new versioned_property behavior.
Also adjusted libbe/comment.py to move to user-specified alt_ids,
rather than uuids.
Diffstat (limited to 'becommands')
-rw-r--r-- | becommands/assign.py | 6 | ||||
-rw-r--r-- | becommands/comment.py | 6 | ||||
-rw-r--r-- | becommands/new.py | 6 | ||||
-rw-r--r-- | becommands/set.py | 2 | ||||
-rw-r--r-- | becommands/target.py | 4 |
5 files changed, 12 insertions, 12 deletions
diff --git a/becommands/assign.py b/becommands/assign.py index 985cfdd..871a3af 100644 --- a/becommands/assign.py +++ b/becommands/assign.py @@ -18,7 +18,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Assign an individual or group to fix a bug""" -from libbe import cmdutil, bugdir, settings_object +from libbe import cmdutil, bugdir __desc__ = __doc__ def execute(args, test=False): @@ -26,7 +26,7 @@ def execute(args, test=False): >>> import os >>> bd = bugdir.simple_bug_dir() >>> os.chdir(bd.root) - >>> bd.bug_from_shortname("a").assigned is settings_object.EMPTY + >>> bd.bug_from_shortname("a").assigned is None True >>> execute(["a"], test=True) @@ -41,7 +41,7 @@ def execute(args, test=False): >>> execute(["a","none"], test=True) >>> bd._clear_bugs() - >>> bd.bug_from_shortname("a").assigned is settings_object.EMPTY + >>> bd.bug_from_shortname("a").assigned is None True """ parser = get_parser() diff --git a/becommands/comment.py b/becommands/comment.py index a11cd90..f350291 100644 --- a/becommands/comment.py +++ b/becommands/comment.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Add a comment to a bug""" -from libbe import cmdutil, bugdir, comment, settings_object, editor +from libbe import cmdutil, bugdir, comment, editor import os import sys try: # import core module, Python >= 2.5 @@ -42,7 +42,7 @@ def execute(args, test=False): True >>> comment.time <= int(time.time()) True - >>> comment.in_reply_to is settings_object.EMPTY + >>> comment.in_reply_to is None True >>> if 'EDITOR' in os.environ: @@ -131,7 +131,7 @@ def execute(args, test=False): raise cmdutil.UserError( "Clashing comment uuids: %s" % new.uuid) uuids.append(new.uuid) - if new.in_reply_to in [settings_object.EMPTY, None]: + if new.in_reply_to == None: new.in_reply_to = parent.uuid new_comments.append(new) else: diff --git a/becommands/new.py b/becommands/new.py index ec28138..922b5ed 100644 --- a/becommands/new.py +++ b/becommands/new.py @@ -16,7 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Create a new bug""" -from libbe import cmdutil, bugdir, settings_object +from libbe import cmdutil, bugdir __desc__ = __doc__ def execute(args, test=False): @@ -36,7 +36,7 @@ def execute(args, test=False): True >>> print bug.severity minor - >>> bug.target == settings_object.EMPTY + >>> bug.target == None True """ parser = get_parser() @@ -56,7 +56,7 @@ def execute(args, test=False): bug.reporter = bug.creator if options.assigned != None: bug.assigned = options.assigned - elif bd.default_assignee != settings_object.EMPTY: + elif bd.default_assignee != None: bug.assigned = bd.default_assignee bd.save() print "Created bug with ID %s" % bd.bug_shortname(bug) diff --git a/becommands/set.py b/becommands/set.py index e771018..939236a 100644 --- a/becommands/set.py +++ b/becommands/set.py @@ -26,7 +26,7 @@ def _value_string(bd, setting): val = bd.settings.get(setting, settings_object.EMPTY) if val == settings_object.EMPTY: default = getattr(bd, bd._setting_name_to_attr_name(setting)) - if default != settings_object.EMPTY: + if default not in [None, settings_object.EMPTY]: val = "None (%s)" % default else: val = None diff --git a/becommands/target.py b/becommands/target.py index 283998a..aa027e0 100644 --- a/becommands/target.py +++ b/becommands/target.py @@ -20,7 +20,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """Show or change a bug's target for fixing""" -from libbe import cmdutil, bugdir, settings_object +from libbe import cmdutil, bugdir __desc__ = __doc__ def execute(args, test=False): @@ -56,7 +56,7 @@ def execute(args, test=False): return bug = bd.bug_from_shortname(args[0]) if len(args) == 1: - if bug.target is None or bug.target is settings_object.EMPTY: + if bug.target is None: print "No target assigned." else: print bug.target |