p1tr installer not recognizing second run
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
P1tr |
Fix Committed
|
Medium
|
Chris Ortner |
Bug Description
When I first started p1tr the installer worked flawlessly. But next time I started P1tr the install started again. Obviously it cant determine correctly if it has already run or not. The second attempt to install p1tr fails with this traceback:
FATAL: Cannot create P1tr directory in your home:
Traceback (most recent call last):
File "bot.py", line 58, in <module>
main()
File "bot.py", line 37, in main
load_language()
File "/Users/
conf_lang = imp.load_
File "./lib/config.py", line 45, in <module>
config_file = install.main()
File "/Users/
shutil.
File "/System/
os.
File "/System/
mkdir(name, mode)
OSError: [Errno 17] File exists: '/Users/
This is not really a bug, it was rather intended to be a feature. In ~/.p1tr you should have a working P1tr installation. This way of proceeding is most useful for normal users, not developers.
However, this is a bit uncomfortable, so you can, as a workaround, copy ~/.p1tr/bot,conf to your P1tr directory for development.
I will commit a change which enables you to use ~/.p1tr/bot.conf when starting P1tr from your development directory.