Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Charles Burton
Gaudi
Commits
8ac508eb
Commit
8ac508eb
authored
Nov 07, 2016
by
Marco Clemencic
Browse files
fix GAUDI-1221
parent
05538d04
Changes
1
Hide whitespace changes
Inline
Side-by-side
GaudiPolicy/scripts/ZipPythonDir.py
View file @
8ac508eb
...
...
@@ -117,14 +117,16 @@ def checkEncoding(fileObj):
## Make a zip file out of a directory containing python modules
def
zipdir
(
directory
,
no_pyc
=
False
):
filename
=
os
.
path
.
realpath
(
directory
+
".zip"
)
log
=
logging
.
getLogger
(
"zipdir"
)
if
not
os
.
path
.
isdir
(
directory
):
raise
OSError
(
20
,
"Not a directory"
,
directory
)
log
.
warning
(
'directory %s missing, creating empty .zip file'
,
directory
)
open
(
filename
,
"ab"
).
close
()
return
msg
=
"Zipping directory '%s'"
if
no_pyc
:
msg
+=
" (without pre-compilation)"
log
.
info
(
msg
,
directory
)
filename
=
os
.
path
.
realpath
(
directory
+
".zip"
)
# Open the file in read an update mode
if
os
.
path
.
exists
(
filename
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment