Merge lp:~mterry/duplicity/fix-gpg-options-crash-0.6 into lp:duplicity/0.6-series

Proposed by Michael Terry on 2010-03-01
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mterry/duplicity/fix-gpg-options-crash-0.6
Merge into: lp:duplicity/0.6-series
Diff against target: 45 lines (+8/-3)
3 files modified
duplicity-bin (+4/-1)
duplicity/commandline.py (+3/-1)
duplicity/dup_time.py (+1/-1)
To merge this branch: bzr merge lp:~mterry/duplicity/fix-gpg-options-crash-0.6
Reviewer Review Type Date Requested Status
duplicity-team 2010-03-01 Pending
Review via email: mp+20381@code.launchpad.net
To post a comment you must log in.
Michael Terry (mterry) wrote :

This fixes the recently reported bug on the mailing list where duplicity crashes when given an empty argument to --gpg-options. My bad.

644. By Michael Terry on 2010-03-01

and handle initial, empty value for extend commandline actions

645. By Michael Terry on 2010-03-02

fix time command line handling

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'duplicity-bin'
--- duplicity-bin 2010-02-17 18:00:45 +0000
+++ duplicity-bin 2010-03-02 01:43:12 +0000
@@ -1111,10 +1111,13 @@
1111 os.setuid(os.geteuid())1111 os.setuid(os.geteuid())
1112 os.setgid(os.getegid())1112 os.setgid(os.getegid())
11131113
1114 # set the current time strings (make it available for command line processing)
1115 dup_time.setcurtime()
1116
1114 # determine what action we're performing and process command line1117 # determine what action we're performing and process command line
1115 action = commandline.ProcessCommandLine(sys.argv[1:])1118 action = commandline.ProcessCommandLine(sys.argv[1:])
11161119
1117 # set the current time strings1120 # set the current time strings again now that we have time separator
1118 dup_time.setcurtime()1121 dup_time.setcurtime()
11191122
1120 # get the passphrase if we need to based on action/options1123 # get the passphrase if we need to based on action/options
11211124
=== modified file 'duplicity/commandline.py'
--- duplicity/commandline.py 2009-12-28 16:03:09 +0000
+++ duplicity/commandline.py 2010-03-02 01:43:12 +0000
@@ -158,7 +158,9 @@
158158
159 def take_action(self, action, dest, opt, value, values, parser):159 def take_action(self, action, dest, opt, value, values, parser):
160 if action == "extend":160 if action == "extend":
161 if hasattr(values, dest):161 if not value:
162 return
163 if hasattr(values, dest) and getattr(values, dest):
162 setattr(values, dest, getattr(values, dest) + ' ' + value)164 setattr(values, dest, getattr(values, dest) + ' ' + value)
163 else:165 else:
164 setattr(values, dest, value)166 setattr(values, dest, value)
165167
=== modified file 'duplicity/dup_time.py'
--- duplicity/dup_time.py 2009-04-02 14:47:12 +0000
+++ duplicity/dup_time.py 2010-03-02 01:43:12 +0000
@@ -63,7 +63,7 @@
63def setcurtime(time_in_secs = None):63def setcurtime(time_in_secs = None):
64 """Sets the current time in curtime and curtimestr"""64 """Sets the current time in curtime and curtimestr"""
65 global curtime, curtimestr65 global curtime, curtimestr
66 t = time_in_secs or long(time.time())66 t = time_in_secs or curtime or long(time.time()) # only set from NOW once
67 assert type(t) in (types.LongType, types.IntType)67 assert type(t) in (types.LongType, types.IntType)
68 curtime, curtimestr = t, timetostring(t)68 curtime, curtimestr = t, timetostring(t)
6969

Subscribers

People subscribed via source and target branches

to all changes: