only options, no file argument possible - parser errors

Bug #1914581 reported by Martin Weis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pastebinit
Invalid
Undecided
Unassigned

Bug Description

calling pastebinit with a file as argument fails: `pastebinit file`

If I understand the command parsing correctly, files as argument were intended:
https://bazaar.launchpad.net/~pastebinit-developers/pastebinit/trunk/view/head:/pastebinit#L338

The traceback below points to a different source location, something fails in the config parser part.

```
Traceback (most recent call last):
  File "/usr/lib/python3.8/configparser.py", line 789, in get
    value = d[option]
  File "/usr/lib/python3.8/collections/__init__.py", line 898, in __getitem__
    return self.__missing__(key) # support subclasses that define __missing__
  File "/usr/lib/python3.8/collections/__init__.py", line 890, in __missing__
    raise KeyError(key)
KeyError: 'page'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pastebinit", line 366, in <module>
    website, params = getParameters(website, pastebind, content, user,
  File "/usr/bin/pastebinit", line 170, in getParameters
    params[paramname] = paste_config.get('defaults', param)
  File "/usr/lib/python3.8/configparser.py", line 792, in get
    raise NoOptionError(option, section)
configparser.NoOptionError: No option 'page' in section: 'defaults'
```

Tags: invalid
Revision history for this message
Martin Weis (martin-weis-newsadress) wrote :

Found the culprit in my local config file ~/.pastebinit.xml
Restored the default one and now everything works as expected.

Please close this issue and sorry for the noise
close #1914581

tags: added: invalid
Revision history for this message
Martin Weis (martin-weis-newsadress) wrote :

User configuration was the error source

Changed in pastebinit:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.