[SCM] Git repository for devscripts branch, master, updated. v2.12.0-26-g0f4cc95
Benjamin Drung
bdrung at debian.org
Sat Aug 4 10:05:03 UTC 2012
The following commit has been merged in the master branch:
commit 0f4cc95b4aa229cab4361f02d08f4a1b4bfde99d
Author: Benjamin Drung <bdrung at debian.org>
Date: Sat Aug 4 12:04:37 2012 +0200
Make suspicious-source and wrap-and-sort valid Python 2 and 3 code.
diff --git a/debian/copyright b/debian/copyright
index c80d8e9..6e242f2 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -86,7 +86,7 @@ Files: doc/suspicious-source.1
scripts/setup.py
scripts/suspicious-source
scripts/wrap-and-sort
-Copyright: 2009-2011, Benjamin Drung <bdrung at debian.org>
+Copyright: 2009-2012, Benjamin Drung <bdrung at debian.org>
2010-2011, Stefano Rivera <stefanor at ubuntu.com>
License: ISC
Permission to use, copy, modify, and/or distribute this software for any
diff --git a/scripts/suspicious-source b/scripts/suspicious-source
index 416f10b..45ec6fd 100755
--- a/scripts/suspicious-source
+++ b/scripts/suspicious-source
@@ -1,6 +1,6 @@
#!/usr/bin/python
-# Copyright (c) 2010-2011, Benjamin Drung <bdrung at debian.org>
+# Copyright (c) 2010-2012, Benjamin Drung <bdrung at debian.org>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -104,10 +104,10 @@ def suspicious_source(whitelisted_mimetypes, whitelisted_extensions, directory,
if mimetype not in whitelisted_mimetypes:
if not [x for x in whitelisted_extensions
if f.lower().endswith(x)]:
+ output = os.path.join(root, f)
if verbose:
- print "%s (%s)" % (os.path.join(root, f), mimetype)
- else:
- print os.path.join(root, f)
+ output += " (" + mimetype + ")"
+ sys.stdout.write(output + "\n")
for vcs_dir in (".bzr", "CVS", ".git", ".svn", ".hg", "_darcs"):
if vcs_dir in dirs:
dirs.remove(vcs_dir)
diff --git a/scripts/wrap-and-sort b/scripts/wrap-and-sort
index b6d5464..3f7ce1f 100755
--- a/scripts/wrap-and-sort
+++ b/scripts/wrap-and-sort
@@ -1,6 +1,6 @@
#!/usr/bin/python
#
-# Copyright (C) 2010-2011, Benjamin Drung <bdrung at debian.org>
+# Copyright (C) 2010-2012, Benjamin Drung <bdrung at debian.org>
# 2010, Stefano Rivera <stefanor at ubuntu.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
@@ -136,7 +136,7 @@ def wrap_and_sort(options):
control_files = [f for f in options.files if re.search("/control[^/]*$", f)]
for control_file in control_files:
if options.verbose:
- print control_file
+ sys.stdout.write(control_file + "\n")
control = WrapAndSortControl(control_file)
if options.cleanup:
control.strip_trailing_spaces()
@@ -148,13 +148,13 @@ def wrap_and_sort(options):
if re.search("/copyright[^/]*$", f)]
for copyright_file in copyright_files:
if options.verbose:
- print copyright_file
+ sys.stdout.write(copyright_file + "\n")
remove_trailing_whitespaces(copyright_file)
install_files = [f for f in options.files if re.search("install$", f)]
for install_file in sorted(install_files):
if options.verbose:
- print install_file
+ sys.stdout.write(install_file + "\n")
install = Install(install_file)
install.sort()
install.save()
--
Git repository for devscripts
More information about the devscripts-devel
mailing list