Skip to content

Commit 49f6604

Browse files
committed
Merge branch 'pr32' into python3
2 parents 2c35d1c + 730a4a7 commit 49f6604

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pyArango/collection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ def getCollectionClass(cls, name) :
149149
try :
150150
return cls.collectionClasses[name]
151151
except KeyError :
152-
raise KeyError("There's no child of Collection by the name of: %s" % name)
152+
raise KeyError("There is no Collection Class of type: '%s';"+
153+
" currently supported values: [%s]"
154+
% (name, ', '.join(getCollectionClasses().keys())))
153155

154156
@classmethod
155157
def isCollection(cls, name) :

pyArango/connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ class Connection(object) :
6969
def __init__(self, arangoURL = 'http://localhost:8529', username=None, password=None) :
7070
self.databases = {}
7171
if arangoURL[-1] == "/" :
72+
if ('url' not in vars()):
73+
raise Exception("you either need to define `url` or make arangoURL contain an HTTP-Host")
7274
self.arangoURL = url[:-1]
7375
else :
7476
self.arangoURL = arangoURL
@@ -138,4 +140,4 @@ def __getitem__(self, dbName) :
138140
try :
139141
return self.databases[dbName]
140142
except KeyError :
141-
raise KeyError("Can't find any database named : %s" % dbName)
143+
raise KeyError("Can't find any database named : %s" % dbName)

0 commit comments

Comments
 (0)