mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-07 13:48:43 +02:00
Raise a ValueError if neither fn nor fh is passed to Ar.__init__
A ValueError is more appropriate because there is no issue with the ar archive itself. Also, the old codepath never worked because the fn parameter was missing.
This commit is contained in:
@@ -101,7 +101,7 @@ class Ar:
|
||||
|
||||
def __init__(self, fn = None, fh = None):
|
||||
if fn == None and fh == None:
|
||||
raise ArError('either \'fn\' or \'fh\' must be != None')
|
||||
raise ValueError('either \'fn\' or \'fh\' must be != None')
|
||||
if fh != None:
|
||||
self.__file = fh
|
||||
self.__closefile = False
|
||||
|
Reference in New Issue
Block a user