MrDraw/run
Gina Häußge 00501f0913 Added code to move old octoprint folder out of the way
Might be left over after an update due to contained .pyc files that then cause the actual application start-up to fail.
2013-09-23 20:38:35 +02:00

30 lines
885 B
Python
Executable file

#!/usr/bin/env python
print """
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!! You are using an old startup method for OctoPrint. !!!
!!! Please perform 'sudo python setup.py install' and !!!
!!! use the 'octoprint' executable instead. !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"""
import os
import sys
basedir = os.path.dirname(os.path.realpath(__file__))
old = os.path.join(basedir, "octoprint")
if os.path.exists(old):
# rename left-overs from old file structure
print """
Found left-overs from old file structure, renaming to
"octoprint.backup". Please remove this manually (I don't
dare to do so myself since you might have changes in there
I don't know anything about).
"""
os.rename(old, os.path.join(basedir, "octoprint.backup"))
sys.path.append(os.path.join(basedir, "src"))
import octoprint
octoprint.main()