Merge pull request #534 from JackDandy/feature/UpdateUnrar

Add ability to parse command line output from unix unrar version 4 an…
This commit is contained in:
JackDandy 2015-10-13 23:33:45 +01:00
commit 665a31640d
2 changed files with 2 additions and 1 deletions

View file

@ -52,6 +52,7 @@
[develop changelog] [develop changelog]
Enable Alpha Ratio again now that the secure login page over https is fixed Enable Alpha Ratio again now that the secure login page over https is fixed
Add ability to parse command line output from unix unrar version 4 and below
### 0.10.0 (2015-08-06 11:05:00 UTC) ### 0.10.0 (2015-08-06 11:05:00 UTC)

View file

@ -178,7 +178,7 @@ class RarFileImplementation(object):
@staticmethod @staticmethod
def rarcmd_dt(param_date=time.strftime('%Y-%m-%d'), param_time=time.strftime('%H:%M')): def rarcmd_dt(param_date=time.strftime('%Y-%m-%d'), param_time=time.strftime('%H:%M')):
for str_fmt in '%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M': for str_fmt in '%Y-%m-%d %H:%M', '%d-%m-%y %H:%M':
try: try:
return time.strptime('%s %s' % (param_date, param_time), str_fmt) return time.strptime('%s %s' % (param_date, param_time), str_fmt)
except ValueError: except ValueError: