Bugfix start as program

This commit is contained in:
Ozzie Isaacs 2022-04-29 18:16:37 +02:00
parent 258b4a6767
commit 5d5a94c9e5
2 changed files with 8 additions and 7 deletions

9
cps.py
View File

@ -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__))
path = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, path)
from cps.main import main as _main
from cps.main import main
if __name__ == '__main__':
_main()
main()

View File

@ -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