• R/O
  • SSH

pyrepo: Commit

Library with common primitives for Python_ programming language


Commit MetaInfo

Revisiónae2507df32a60cc93424b804cbbbce892710daaf (tree)
Tiempo2021-12-10 08:18:52
AutorSergey Gusarov <laborer2008@gmai...>
CommiterSergey Gusarov

Log Message

fs: Quoted path items

Cambiar Resumen

Diferencia incremental

diff -r 06beda7c7cf3 -r ae2507df32a6 fs.py
--- a/fs.py Thu Jan 09 17:24:30 2020 +0300
+++ b/fs.py Fri Dec 10 02:18:52 2021 +0300
@@ -17,26 +17,26 @@
1717
1818 def cleanDir(dir):
1919 dir = os.path.abspath(dir)
20- print('Deleting: ' + dir)
20+ print('Deleting: \'' + dir + '\'')
2121 shutil.rmtree(dir, ignore_errors = True)
2222
2323
2424 def removeFile(file, ignoreNotFound = True):
2525 file = os.path.abspath(file)
26- print('Deleting: ' + file)
26+ print('Deleting: \'' + file + '\'')
2727
2828 try:
2929 if os.path.isfile(file):
3030 os.unlink(file)
3131 else:
32- print(file + ' - not a file')
32+ print('\'' + file + '\' - not a file')
3333 except OSError as e:
3434 if ignoreNotFound:
3535 if e.errno != errno.ENOENT:
3636 doRaise = True
3737 else:
3838 doRaise = False
39- print('File ' + file + ' not found')
39+ print('File \'' + file + '\' was not found')
4040 else:
4141 doRaise = True
4242
@@ -91,7 +91,7 @@
9191 makeSurePathExists(dir)
9292 shutil.copy(file, dir)
9393 else:
94- print(file + ' - not a file')
94+ print('\'' + file + '\' - not a file')
9595
9696
9797 def copyTree(src, dest, verbose = 0):
@@ -182,7 +182,7 @@
182182 def makeFileExecutable(file):
183183 file = os.path.abspath(file)
184184
185- print('Adding executable bit to the file ' + file)
185+ print('Adding executable bit to the file \'' + file + '\'')
186186 st = os.stat(file)
187187 os.chmod(file, st.st_mode | stat.S_IEXEC)
188188
Show on old repository browser