1. 24 Apr, 2018 7 commits
    • Tanner Prestegard's avatar
    • Tanner Prestegard's avatar
      Merge branch 'fix-spuriuos-blank-logging-messages' into 'master' · 6fb823e3
      Tanner Prestegard authored
      Fix spurious blank GraceDb logging entries in Python 3
      
      See merge request !21
      6fb823e3
    • Leo Pound Singer's avatar
      Fix spurious blank GraceDb logging entries in Python 3 · 454219d5
      Leo Pound Singer authored
      In Python 3, we started emitting a blank GraceDb message after
      every logging entry. For example, see
      https://gracedb-playground.ligo.org/events/view/T0191.
      
      This is because of a change in `logging.StreamHandler` that caused
      a terminating newline to be written after every logging message,
      in a separate call to `write()`. See
      https://github.com/python/cpython/commit/2a20dfc2aabc3259d5b4276eeec91f83230fdcac.
      454219d5
    • Tanner Prestegard's avatar
      Merge branch 'fix-file-uploads-types-python3' into 'master' · a17a4ee7
      Tanner Prestegard authored
      Fix Python 3 type checking in file uploads
      
      See merge request !20
      a17a4ee7
    • Tanner Prestegard's avatar
      Merge branch 'fix-multipart-encoding' into 'master' · 74009132
      Tanner Prestegard authored
      Fix Python 3 unicode exception in file uploads
      
      See merge request !19
      74009132
    • Leo Pound Singer's avatar
      Fix Python 3 type checking in file uploads · 48faf15a
      Leo Pound Singer authored
      Python 3 does not have the built-in `file` type. Instead it has
      a hierarchy of types in the `io` module. This fixes tracebacks like
      the following:
      
          Traceback (most recent call last):
            File "/private/tmp/gwcelery/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
              R = retval = fun(*args, **kwargs)
            File "/private/tmp/gwcelery/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
              return self.run(*args, **kwargs)
            File "/Users/lpsinger/src/gwcelery/gwcelery/tasks/gracedb.py", line 27, in upload
              graceid, message, filename, filecontents, tags)
            File "/private/tmp/gwcelery/lib/python3.6/site-packages/ligo/gracedb/rest.py", line 820, in writeLog
              elif isinstance(filecontents, file):
          NameError: name 'file' is not defined
      48faf15a
    • Leo Pound Singer's avatar
      Fix Python 3 unicode exception in file uploads · da8011be
      Leo Pound Singer authored
      This fixes the crash when attempting to create a new file in Python 3:
      
          $ gracedb Test gstlal HighMass coinc.xml
          Traceback (most recent call last):
            File "/Users/lpsinger/local/bin/gracedb", line 564, in <module>
              code = main()
            File "/Users/lpsinger/local/bin/gracedb", line 501, in main
              offline=options.offline, labels=options.labels)
            File "/Users/lpsinger/local/lib/python3.6/site-packages/ligo/gracedb/rest.py", line 619, in createEvent
              return self.post(uri, fields, files=files)
            File "/Users/lpsinger/local/lib/python3.6/site-packages/ligo/gracedb/rest.py", line 381, in post
              return self.post_or_put("POST", *args, **kwargs)
            File "/Users/lpsinger/local/lib/python3.6/site-packages/ligo/gracedb/rest.py", line 399, in post_or_put
              content_type, body = encode_multipart_formdata(body, files)
            File "/Users/lpsinger/local/lib/python3.6/site-packages/ligo/gracedb/rest.py", line 1285, in encode_multipart_formdata
              body = CRLF.join(L)
          TypeError: sequence item 20: expected str instance, bytes found
      da8011be
  2. 13 Feb, 2018 1 commit
  3. 10 Feb, 2018 2 commits
  4. 01 Dec, 2017 2 commits
  5. 03 Nov, 2017 2 commits
  6. 23 Aug, 2017 1 commit
  7. 11 Aug, 2017 1 commit
  8. 03 Aug, 2017 1 commit
  9. 02 Aug, 2017 4 commits
  10. 26 Jul, 2017 1 commit
  11. 25 Jul, 2017 1 commit
  12. 25 May, 2017 5 commits
  13. 19 May, 2017 2 commits
  14. 03 May, 2017 1 commit
  15. 09 Mar, 2017 1 commit
  16. 07 Mar, 2017 2 commits
  17. 06 Mar, 2017 1 commit
    • Leo Pound Singer's avatar
      Check permissions on netrc file · 33aaf459
      Leo Pound Singer authored
      The netrc.netrc class from the Python standard library applies access
      safety checks (requiring that the netrc file is readable only by the
      current user, and not by group members or other users) only if using the
      netrc file in the default location (~/.netrc). This subclass applies the
      same access safety checks regardless of the path to the netrc file.
      33aaf459
  18. 03 Feb, 2017 4 commits
  19. 02 Feb, 2017 1 commit