diff options
Diffstat (limited to 'grs/Rotator.py')
-rw-r--r-- | grs/Rotator.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/grs/Rotator.py b/grs/Rotator.py index a3684a9..f303c14 100644 --- a/grs/Rotator.py +++ b/grs/Rotator.py @@ -42,11 +42,12 @@ class Rotator(): obj's paste an upper limit are deleted. """ - objs = glob.glob('%s.*' % obj) + objs = glob.glob('%s.[0-9]*' % obj) indexed_obj = {} for _obj in objs: _match = re.search(r'^.+\.(\d+)$', _obj) - indexed_obj[int(_match.group(1))] = _obj + if (_match.group(1)): + indexed_obj[int(_match.group(1))] = _obj count = list(indexed_obj.keys()) count.sort() count.reverse() |