[Pkg-privacy-commits] [mat] 09/68: Improves a bit portability

Sascha Steinbiss sascha at steinbiss.name
Sun Jan 3 12:32:38 UTC 2016


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

sascha-guest pushed a commit to branch master
in repository mat.

commit d054e313d7d83ec0089f7e0efe6b8a988fe99b3a
Author: jvoisin <julien.voisin at dustri.org>
Date:   Tue Nov 3 17:12:38 2015 +0100

    Improves a bit portability
---
 libmat/parser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libmat/parser.py b/libmat/parser.py
index c6ba0a4..23cad6b 100644
--- a/libmat/parser.py
+++ b/libmat/parser.py
@@ -120,7 +120,7 @@ class GenericParser(object):
     def create_backup_copy(self):
         """ Create a backup copy
         """
-        shutil.copy2(self.filename, self.filename + '.bak')
+        shutil.copy2(self.filename, os.path.join(self.filename, '.bak'))
 
     def do_backup(self):
         """ Keep a backup of the file if asked.
@@ -129,7 +129,7 @@ class GenericParser(object):
             but it greatly simplify new strippers implementation.
         """
         if self.backup:
-            shutil.move(self.filename, self.filename + '.bak')
+            shutil.move(self.filename, os.path.join(self.filename, '.bak'))
         else:
             mat.secure_remove(self.filename)
         shutil.move(self.output, self.filename)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git



More information about the Pkg-privacy-commits mailing list