1. Thomas Kluyver
  2. sphinx-wiki

Commits

Thomas Kluyver  committed 896c91f

Allow Python conversion script to work when run at the command line, with no environment variable.

  • Participants
  • Parent commits ed77ba0
  • Branches default

Comments (0)

Files changed (1)

File sphinx-wiki.py

View file
     #    we would not be able to handle multiple users editing on the wiki.
     text_hash = md5(rst_text).hexdigest()
     log_file.info('From IP number: %s; hash = %s; snippet = %s' % (\
-                                        os.environ['REMOTE_ADDR'], text_hash,
-                                        rst_text[50:150].replace('\n',';')))
+                                    os.environ.get('REMOTE_ADDR',''), text_hash,
+                                    rst_text[50:150].replace('\n',';')))
 
     # 1. Pre-process the raw RST test: process any options that are given. E.g.: