mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 01:20:32 +00:00
Bugfix start as program
This commit is contained in:
parent
258b4a6767
commit
5d5a94c9e5
13
cps.py
13
cps.py
@ -20,16 +20,15 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Are we running from commandline?
|
||||
if __package__ == '':
|
||||
# Add local path to sys.path so we can import cps
|
||||
path = os.path.dirname(os.path.dirname(__file__))
|
||||
sys.path.insert(0, path)
|
||||
|
||||
from cps.main import main as _main
|
||||
# Add local path to sys.path so we can import cps
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, path)
|
||||
|
||||
from cps.main import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
_main()
|
||||
main()
|
||||
|
||||
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
__package__ = "cps"
|
||||
|
||||
import sys
|
||||
import os
|
||||
import mimetypes
|
||||
|
Loading…
Reference in New Issue
Block a user