Merge lp://staging/~mac9416/keryx/1.0 into lp://staging/~keryx-admins/keryx/1.0

Proposed by mac9416
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~mac9416/keryx/1.0
Merge into: lp://staging/~keryx-admins/keryx/1.0
Diff against target: 80 lines (+10/-6)
4 files modified
src/cli.py (+2/-1)
src/keryx.py (+1/-1)
src/libkeryx/definitions/apt_def/__init__.py (+4/-3)
src/libkeryx/factory.py (+3/-1)
To merge this branch: bzr merge lp://staging/~mac9416/keryx/1.0
Reviewer Review Type Date Requested Status
Keryx Admins Pending
Review via email: mp+16921@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
mac9416 (mac9416) wrote :

Did a little style cleanup and changed some debugging stuff in the APT definition from print to logging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/cli.py'
2--- src/cli.py 2010-01-05 01:32:39 +0000
3+++ src/cli.py 2010-01-06 18:04:15 +0000
4@@ -109,7 +109,8 @@
5
6 def get_func(self, command):
7 """Returns the registered function to call and the number of parameters
8- Should only be used after calling check_command"""
9+ Should only be used after calling check_command
10+ """
11 if not(self.commands.has_key(command)):
12 error = "Invalid command '%s'. %s" % (command, self.help)
13 return [None, None, error]
14
15=== modified file 'src/keryx.py'
16--- src/keryx.py 2010-01-04 00:26:06 +0000
17+++ src/keryx.py 2010-01-06 18:04:15 +0000
18@@ -22,7 +22,7 @@
19 import logging
20 #logging.basicConfig(level=logging.DEBUG)
21
22-dir_download = 'downloads'
23+dir_download = 'downloads' # Needs to go in consts?
24
25 class KeryxLauncher:
26 def __init__(self):
27
28=== modified file 'src/libkeryx/definitions/apt_def/__init__.py'
29--- src/libkeryx/definitions/apt_def/__init__.py 2010-01-05 01:26:58 +0000
30+++ src/libkeryx/definitions/apt_def/__init__.py 2010-01-06 18:04:15 +0000
31@@ -144,6 +144,7 @@
32 yesno = raw_input("Do you want to continue [Y/n]? ").lower()
33
34 if not yesno == 'y':
35+ print "Abort."
36 return
37
38 current_dir = os.getcwd()
39@@ -202,13 +203,13 @@
40 errcode, failure = commands.getstatusoutput("sudo cp %s/* /var/lib/apt/lists" \
41 % lists_folder)
42 if errcode:
43- print failure
44+ logging.error(failure)
45 return
46
47 print "Updating APT cache..."
48 errcode, failure = commands.getstatusoutput("sudo apt-cache gencaches")
49 if errcode:
50- print failure
51+ logging.error(failure)
52 return
53
54 # Remove the lock file if it exists
55@@ -221,7 +222,7 @@
56 print failure
57 return
58
59- print "Finished installing." \
60+ print "Finished installing. " \
61 "Orange you glad you used %s?" % (keryx.__appname__.capitalize())
62
63 ###############################################################################
64
65=== modified file 'src/libkeryx/factory.py'
66--- src/libkeryx/factory.py 2009-12-26 04:18:56 +0000
67+++ src/libkeryx/factory.py 2010-01-06 18:04:15 +0000
68@@ -38,9 +38,11 @@
69 logging.debug(definitions)
70
71
72+# shouldn't this be get_project?
73 def GetProject(name, db_file=None):
74 """Returns a definition instance for a project called 'name'
75- Raises exception on failure"""
76+ Raises exception on failure
77+ """
78
79 # No database was supplied, use the default libkeryx database
80 if not db_file:

Subscribers

People subscribed via source and target branches

to all changes: