Skip to content

Attachment bug in olog script #4

@dejande

Description

@dejande

Hi.

There is an error when calling an olog script with "-a" parameter.

Traceback (most recent call last):
  File "./olog", line 151, in <module>
    olog()
  File "./olog", line 125, in olog
    attachments = [Attachment(open(a)) for a in args.attach.split(',')]
AttributeError: 'list' object has no attribute 'split'

By removing ".split(',')" in

https://github.com/Olog/pyOlog/blob/master/scripts/olog#L125

uploading attachments works.

Also if you want to upload multiple attachments with the same name you get the following error:

Traceback (most recent call last):
  File "./olog", line 151, in <module>
    olog()
  File "./olog", line 148, in olog
    client.log(log_entry)
  File "/usr/local/lib/python2.7/dist-packages/pyOlog/OlogClient.py", line 82, in log
    resp.raise_for_status()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 825, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict

Python 2.7.9
requests 2.4.3
urllib3 1.9.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions