absolute imports

This commit is contained in:
j 2016-10-01 19:56:41 +02:00
parent 2809ebb07b
commit 41bb911859

View file

@ -943,14 +943,14 @@ class Client(object):
sys.exit(1) sys.exit(1)
def server(self, args): def server(self, args):
import server from . import server
server.run(self, args) server.run(self, args)
def client(self, args): def client(self, args):
if not args: if not args:
print('usage: %s client <server_url>\n\ti.e. %s client http://192.168.1.1:8789' % (sys.argv[0], sys.argv[0])) print('usage: %s client <server_url>\n\ti.e. %s client http://192.168.1.1:8789' % (sys.argv[0], sys.argv[0]))
sys.exit(1) sys.exit(1)
import client from . import client
url = args[0] url = args[0]
if len(args) == 1: if len(args) == 1:
name = socket.gethostname() name = socket.gethostname()