[Reportbug-commits] [reportbug] 01/32: port reportbug.testfile to py3k

Sandro Tosi morph at moszumanska.debian.org
Thu Dec 1 01:36:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit e1f670432d821440fa9c182fa65b3767804e7ad2
Author: Sandro Tosi <morph at debian.org>
Date:   Sat Jun 18 21:33:53 2016 +0100

    port reportbug.testfile to py3k
---
 reportbug/tempfiles.py | 4 ++--
 test/test_tempfiles.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/reportbug/tempfiles.py b/reportbug/tempfiles.py
index 89fc94f..5c436c6 100644
--- a/reportbug/tempfiles.py
+++ b/reportbug/tempfiles.py
@@ -56,9 +56,9 @@ if hasattr(os, 'O_BINARY'):
 # Based on python-1.5.2/Lib/tempfile.py
 def open_write_safe(filename, mode='w+b', bufsize=-1):
     if 'b' in mode:
-        fd = os.open(filename, _bin_openflags, 0600)
+        fd = os.open(filename, _bin_openflags, 0o600)
     else:
-        fd = os.open(filename, _text_openflags, 0600)
+        fd = os.open(filename, _text_openflags, 0o600)
 
     try:
         return os.fdopen(fd, mode, bufsize)
diff --git a/test/test_tempfiles.py b/test/test_tempfiles.py
index ab9862e..9709bf8 100644
--- a/test/test_tempfiles.py
+++ b/test/test_tempfiles.py
@@ -1,10 +1,10 @@
-import unittest2
+import unittest
 
 from reportbug import tempfiles
 import os.path
 
 
-class TestTempfiles(unittest2.TestCase):
+class TestTempfiles(unittest.TestCase):
     def test_tempfile_prefix(self):
         extra = 'dummystring'
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list