Package: reportbug Version: 4.0 Severity: normal Tags: patch reportbuug's modules can be made more platform independent by carefully importing platform specific modules. This helps a lot, when using reportbug modules on other platforms (like Microsoft Windows).
Ritesh -- Package-specific info: ** Environment settings: DEBEMAIL="[email protected]" DEBFULLNAME="Ritesh Raj Sarraf" ** /home/rrs/.reportbugrc: reportbug_version "3.35" mode advanced email "[email protected]" no-cc header "X-Debbugs-CC: [email protected]" smtphost reportbug.debian.org -- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.29-custom (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages reportbug depends on: ii apt 0.7.20.2 Advanced front-end for dpkg ii python 2.5.4-2 An interactive high-level object-o ii python-reportbug 4.0 Python modules for interacting wit reportbug recommends no packages. Versions of packages reportbug suggests: ii debconf-utils 1.5.26 debconf utilities ii debsums 2.0.43 verification of installed package ii dlocate 0.96.1 fast alternative to dpkg -L and dp ii exim4 4.69-9 metapackage to ease Exim MTA (v4) ii exim4-daemon-light [mail-tran 4.69-9 lightweight Exim MTA (v4) daemon ii file 5.00-1 Determines file type using "magic" ii gnupg 1.4.9-4 GNU privacy guard - a free PGP rep ii python-gtk2 2.14.1-1 Python bindings for the GTK+ widge ii python-urwid 0.9.8.4-1 curses-based UI/widget library for -- no debconf information
>From 0b4c527def7fbef05ccc6bd9bba6be3f4f4ee877 Mon Sep 17 00:00:00 2001 From: Ritesh Raj Sarraf <[email protected]> Date: Sat, 4 Apr 2009 03:24:32 +0530 Subject: [PATCH] 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. --- reportbug/utils.py | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/reportbug/utils.py b/reportbug/utils.py index ce7e79d..123067b 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' -- 1.6.2.1

