fix problem running get_translations if translations/ doesn't exist
This commit is contained in:
1 parent
33bc2dd489
commit
cbf9ff418c
1 file changed
+2
-1
@@ -412,7 +412,8 @@ class get_translations(Command):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
import urllib, shutil
|
import urllib, shutil
|
||||||
shutil.rmtree('translations/')
|
if os.path.exists('translations'):
|
||||||
|
shutil.rmtree('translations/')
|
||||||
os.makedirs('translations')
|
os.makedirs('translations')
|
||||||
filename, headers = urllib.urlretrieve('http://wicd.sourceforge.net/translator/idlist/')
|
filename, headers = urllib.urlretrieve('http://wicd.sourceforge.net/translator/idlist/')
|
||||||
id_file = open(filename, 'r')
|
id_file = open(filename, 'r')
|
||||||
|
|||||||
Reference in new issue
Block a user