Skip to content

Commit

Permalink
Set base_url to None when --base-url CLI parameter is empty string
Browse files Browse the repository at this point in the history
Fix #532.
  • Loading branch information
liZe committed Nov 16, 2017
1 parent 4e3cfb5 commit 3961774
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion weasyprint/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@ def main(argv=None, stdout=None, stdin=None):
stdin = sys.stdin
# stdin.buffer on Py3, stdin on Py2
source = getattr(stdin, 'buffer', stdin)
if not args.base_url:
if args.base_url is None:
args.base_url = '.' # current directory
elif args.base_url == '':
args.base_url = None # no base URL
else:
source = args.input

Expand Down

0 comments on commit 3961774

Please sign in to comment.