[Pypt-offline-general] SF.net SVN: pypt-offline: [181] trunk/pypt_core.py
Status: Beta
Brought to you by:
riteshsarraf
|
From: <rit...@us...> - 2007-08-10 23:08:05
|
Revision: 181
http://pypt-offline.svn.sourceforge.net/pypt-offline/?rev=181&view=rev
Author: riteshsarraf
Date: 2007-08-10 16:08:03 -0700 (Fri, 10 Aug 2007)
Log Message:
-----------
* Change No Bugs log level to 'msg'
* Display the bugs subject line also along with the bug number
Modified Paths:
--------------
trunk/pypt_core.py
Modified: trunk/pypt_core.py
===================================================================
--- trunk/pypt_core.py 2007-08-10 22:04:27 UTC (rev 180)
+++ trunk/pypt_core.py 2007-08-10 23:08:03 UTC (rev 181)
@@ -258,7 +258,7 @@
if self.platform == 'posix':
sys.stdout.write(self.color_syntax + self.color[color])
- sys.stderr.write(self.color_syntax + self.color(color))
+ sys.stderr.write(self.color_syntax + self.color[color])
elif self.platform == 'microsoft':
WConio.textcolor(self.color[color])
@@ -1252,9 +1252,10 @@
def list_bugs():
log.msg("\n\nFollowing are the list of bugs present.\n")
- for each_bug in bugs_number:
- each_bug = each_bug.split('.')[1]
- log.msg("%s\n" % (each_bug) )
+ for each_bug in bugs_number.keys():
+ bug_num = each_bug.split('.')[1]
+ bug_subject = bugs_number[each_bug]
+ log.msg("%s\t%s\n" % (bug_num, bug_subject) )
if arg_type == 1:
try:
@@ -1270,10 +1271,17 @@
sys.exit(1)
file = zipfile.ZipFile(install_file_path, "r")
- bugs_number = []
+ bugs_number = {}
for filename in file.namelist():
if filename.endswith(pypt_bug_file_format):
- bugs_number.append(filename)
+ bug_subject_file = file.read(filename)
+ bug_subject = bug_subject_file.split('\r')
+ del bug_subject_file
+ for subject in bug_subject:
+ if subject.startswith('#'):
+ subject = subject.lstrip(subject.split(":")[0])
+ break
+ bugs_number[filename] = subject
if bugs_number:
# Display the list of bugs
@@ -1347,10 +1355,10 @@
log.err('Incorrect choice. Exiting\n')
sys.exit(1)
else:
- log.verbose("Great!!! No bugs found for all the packages that were downloaded.\n")
+ log.msg("Great!!! No bugs found for all the packages that were downloaded.\n")
response = raw_input("Continue with Installation. Y/N ?")
response = response.rstrip("\r")
- if response.endswith('y') or reponse.endswith('Y'):
+ if response.endswith('y') or response.endswith('Y'):
log.verbose("Continuing with syncing the files.\n")
for filename in file.namelist():
@@ -1445,7 +1453,7 @@
log.err('Incorrect choice. Exiting\n')
sys.exit(1)
else:
- log.verbose("Great!!! No bugs found for all the packages that were downloaded.\n")
+ log.msg("Great!!! No bugs found for all the packages that were downloaded.\n")
response = raw_input("Continue with Installation. Y/N?")
response = response.rstrip("\r")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|