Admin-media symlinking sometimes fail under virtualenv. Catching the error and giving a warning instead.
This commit is contained in:
parent
00c4f8a60d
commit
ad63abee39
1 changed files with 5 additions and 2 deletions
|
|
@ -174,8 +174,11 @@ def create_admin_media_links():
|
||||||
os.mkdir(apath)
|
os.mkdir(apath)
|
||||||
os.system('xcopy "%s" "%s" /e /q /c' % (dpath, apath))
|
os.system('xcopy "%s" "%s" /e /q /c' % (dpath, apath))
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
os.symlink(dpath, apath)
|
try:
|
||||||
print _(" Admin-media symlinked to ADMIN_MEDIA_ROOT.")
|
os.symlink(dpath, apath)
|
||||||
|
print _(" Admin-media symlinked to ADMIN_MEDIA_ROOT.")
|
||||||
|
except OSError:
|
||||||
|
print _(" There was an error symlinking Admin-media to ADMIN_MEDIA_ROOT. If you see issues, link manually.")
|
||||||
else:
|
else:
|
||||||
print _(" Admin-media files should be copied manually to ADMIN_MEDIA_ROOT.")
|
print _(" Admin-media files should be copied manually to ADMIN_MEDIA_ROOT.")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue