Skip to content

Commit

Permalink
Fixed running from Pypi package
Browse files Browse the repository at this point in the history
  • Loading branch information
WesR committed Oct 6, 2021
1 parent 7a69ea9 commit c421840
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = halcyon-matrix
version = 1.0.1
version = 1.0.2
author = Wes Ring
author_email = hello@wesring.com
description = Halcyon is an easy to use matrix library
Expand Down
4 changes: 3 additions & 1 deletion src/halcyon/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .halcyon import *
from .halcyon import *

#from .restrunner import *
4 changes: 2 additions & 2 deletions src/halcyon/halcyon.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _init(self, halcyonToken=None, userID=None, password=None, homeserver=None):
accessToken = decodedToken["token"]
deviceID = decodedToken["device_id"]

self.restrunner = restrunner.Runner(homeserver=homeserver, user_id=userID, access_token=accessToken, device_id=deviceID)
self.restrunner = halcyon.restrunner.Runner(homeserver=homeserver, user_id=userID, access_token=accessToken, device_id=deviceID)

resp = self.restrunner.whoami()
if "errcode" not in resp:
Expand All @@ -84,7 +84,7 @@ def _init(self, halcyonToken=None, userID=None, password=None, homeserver=None):

if userID and password:
if homeserver:
self.restrunner = restrunner.Runner(homeserver=homeserver, user_id=userID)
self.restrunner = halcyon.restrunner.Runner(homeserver=homeserver, user_id=userID)
client._generateNewSessionToken(userID, password)
self.logoutOnDeath = True
#TODO: state.json file
Expand Down

0 comments on commit c421840

Please sign in to comment.