[Reportbug-commits] [SCM] Reportbug - reports bugs in the Debian distribution branch, master, updated. 4.1-21-gf732763

Sandro Tosi morph at debian.org
Sat Apr 18 17:41:39 UTC 2009


The following commit has been merged in the master branch:
commit 25da57553a07c6bd72300826d8bbd7fb34852180
Author: Ritesh Raj Sarraf <rrs at researchut.com>
Date:   Sat Apr 4 03:24:32 2009 +0530

    Make reportbug platform independent
    
    There are 2 modules wich are platform specific.
    utils.py => pwd, tempfile
    
    Both these modules have dependency only on reportbug.
    With these 2 modules handled, querybts is able to give me an initial list of bug report summary for any package.
    
    For handling of these modules, we could either do what I've done, or else separate them to a new module file.

diff --git a/reportbug/utils.py b/reportbug/utils.py
index acd3979..7341633 100644
--- a/reportbug/utils.py
+++ b/reportbug/utils.py
@@ -27,7 +27,16 @@
 import sys
 import os
 import re
-import pwd
+import platform
+try:
+    import pwd
+    from tempfiles import TempFile, tempfile_prefix
+except ImportError, e:
+    if platform.system() == 'Windows':
+        pass
+    else:
+        print e
+        sys.exit(1)
 import commands
 import shlex
 import rfc822
@@ -36,7 +45,6 @@ import subprocess
 
 import debianbts
 from string import ascii_letters, digits
-from tempfiles import TempFile, tempfile_prefix
 
 # Paths for dpkg
 DPKGLIB = '/var/lib/dpkg'

-- 
Reportbug - reports bugs in the Debian distribution



More information about the Reportbug-commits mailing list