Skip to content

Commit

Permalink
Commands calling PitzShow crash when proj.me hasn't been defined.
Browse files Browse the repository at this point in the history
Fixed.
  • Loading branch information
Matěj Cepl committed May 22, 2012
1 parent 28c0fa5 commit 9f1b737
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,3 +13,4 @@ pitz_prof
pitzdir/me.yaml
pitzdir/pitz.pid
pitzdir/hooks/after_add_task
tags
8 changes: 4 additions & 4 deletions pitz/cmdline/__init__.py
Expand Up @@ -591,14 +591,14 @@ def handle_proj(self, p, options, args, proj):

if isinstance(e, Entity):

colorization = None
if proj.me:
colorization = proj.me.use_colorization
clepy.send_through_pager(
e.custom_view(
options.custom_view or 'detailed_view',

color=self.figure_out_colorization(
options.color,
proj.me.use_colorization)),

options.color, colorization)),
clepy.figure_out_pager(os.environ))

else:
Expand Down
14 changes: 14 additions & 0 deletions pitzdir/activity-2ae61e27-e726-4fcc-9b4f-e89c51d2d39b.yaml
@@ -0,0 +1,14 @@
created_by: &id002 !!python/object:uuid.UUID
int: 121087376307874086099140936508327087962
created_time: &id001 2012-05-22 13:20:23.300199
description: ''
entity: !!python/object:uuid.UUID
int: 157121179184309617561263659582440039651
modified_time: *id001
pscore: 0
title: mcepl set status from unstarted to finished on 763470
type: activity
uuid: !!python/object:uuid.UUID
int: 57022415734153277914099219133155693467
who_did_it: *id002
yaml_file_saved: 2012-05-22 13:20:23.308652
14 changes: 14 additions & 0 deletions pitzdir/activity-701e0c8b-b55a-4441-acaa-048b21265925.yaml
@@ -0,0 +1,14 @@
created_by: &id002 !!python/object:uuid.UUID
int: 121087376307874086099140936508327087962
created_time: &id001 2012-05-22 12:55:23.308923
description: ''
entity: !!python/object:uuid.UUID
int: 157121179184309617561263659582440039651
modified_time: *id001
pscore: 0
title: mcepl set owner from no owner to mcepl on 763470
type: activity
uuid: !!python/object:uuid.UUID
int: 149029558891422368330700054418971580709
who_did_it: *id002
yaml_file_saved: 2012-05-22 12:55:23.371139
14 changes: 14 additions & 0 deletions pitzdir/activity-800e7a5a-aa43-41c0-a068-24f8147446e6.yaml
@@ -0,0 +1,14 @@
created_by: &id002 !!python/object:uuid.UUID
int: 121087376307874086099140936508327087962
created_time: &id001 2012-05-22 13:20:23.250069
description: ''
entity: !!python/object:uuid.UUID
int: 157121179184309617561263659582440039651
modified_time: *id001
pscore: 0
title: mcepl set owner from mcepl to mcepl on 763470
type: activity
uuid: !!python/object:uuid.UUID
int: 170216357253688751312766455256756537062
who_did_it: *id002
yaml_file_saved: 2012-05-22 13:20:23.304743
12 changes: 12 additions & 0 deletions pitzdir/person-5b189494-8fa2-41d3-8cde-b84a5a244f5a.yaml
@@ -0,0 +1,12 @@
attached_files: []
created_time: &id001 2012-05-22 12:27:42.066771
description: '# Person description goes here
Trying to find my way around here.'
modified_time: *id001
pscore: 0
title: mcepl
type: person
uuid: !!python/object:uuid.UUID
int: 121087376307874086099140936508327087962
yaml_file_saved: 2012-05-22 12:27:42.124994
27 changes: 27 additions & 0 deletions pitzdir/task-7634703a-406b-402a-8b2d-5c847fbb64e3.yaml
@@ -0,0 +1,27 @@
components: []
created_time: 2012-05-22 11:52:05.698110
description: "# Task description goes here\nwycliff:pitz (master) $ pitz-show 98876e\n\
Traceback (most recent call last):\n File \"/home/matej/.local/bin/pitz-show\"\
, line 9, in <module>\n load_entry_point('pitz==1.2.4', 'console_scripts', 'pitz-show')()\n\
\ File \"/home/matej/archiv/knihovna/repos/pitz/pitz/cmdline/__init__.py\", line\
\ 306, in __call__\n self.handle_proj(p, options, args, proj)\n File \"/home/matej/archiv/knihovna/repos/pitz/pitz/cmdline/__init__.py\"\
, line 600, in handle_proj\n proj.me.use_colorization)),\nAttributeError: 'NoneType'\
\ object has no attribute 'use_colorization'\nwycliff:pitz (master) $"
estimate: !!python/object:uuid.UUID
int: 75772849121300233890882493547161365968
milestone: !!python/object:uuid.UUID
int: 43202488294965147244317640483158997306
modified_time: 2012-05-22 13:20:23.300010
owner: !!python/object:uuid.UUID
int: 121087376307874086099140936508327087962
pscore: 0
status: !!python/object:uuid.UUID
int: 181191650815078915740523248343325601886
tags:
- !!python/object:uuid.UUID
int: 213302401238485658731862796644474871986
title: Crash in proj.me.use_colorization
type: task
uuid: !!python/object:uuid.UUID
int: 157121179184309617561263659582440039651
yaml_file_saved: 2012-05-22 13:20:23.312757
30 changes: 30 additions & 0 deletions pitzdir/task-ae0765f1-bcfb-4d2f-bf32-ce65c97f0a9a.yaml
@@ -0,0 +1,30 @@
components: []
created_time: &id001 2012-05-22 11:44:55.148489
description: '# Task description goes here
It would be much better if pitz would follow the git example ... having all
commands in some %{_libdir}/pitz/ directory and central command pitz which
should call the subcommands.
Of course, the following first step should be to rewrite setup.py.'
estimate: !!python/object:uuid.UUID
int: 207205260775652781422748338617572801073
milestone: !!python/object:uuid.UUID
int: 43202488294965147244317640483158997306
modified_time: *id001
owner: !!python/object:uuid.UUID
int: 219503519214021148627266826050732492225
pscore: 0
status: !!python/object:uuid.UUID
int: 327359014471868074244219043980996376403
tags:
- !!python/object:uuid.UUID
int: 327280339527671628486558366906481688438
title: Rewrite setup.py to move subcommands out of $PATH
type: task
uuid: !!python/object:uuid.UUID
int: 231324085020429227165209919096344218266
yaml_file_saved: 2012-05-22 11:44:55.210106

0 comments on commit 9f1b737

Please sign in to comment.