Michael Elsdörfer  committed 853c08d

fixed a bug that must have been introduced a couple commits ago

  • Participants
  • Parent commits 714f5b1

Comments (0)

Files changed (1)

File pyutils/

     >>> urlarg('', {'x': 2})
     Traceback (most recent call last):
     ValueError: name argument must be a string
+    [bug] Removing an argument is not confused with querying one.
+    >>> urlarg('', 'x', False)
+    ''
+    >>> urlarg('', 'x', None)
+    '1'
     # see test - make it harder to confuse urlarg and urlargs
     if not isinstance(name, basestring):
         raise ValueError('name argument must be a string')
-    if value:
+    if value is not None:
         return urlargs(url, {name: value})
         return urlargs(url, name)