diff options
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index c1c02fe5a..11cd0241a 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -538,13 +538,15 @@ class ServerMethods(): self.add_package(th.name, [th.name], 1) - def get_log(self): + def get_log(self, offset=0): filename = join(self.core.config['log']['log_folder'], 'log.txt') try: fh = open(filename, "r") lines = fh.readlines() fh.close() - return lines + if offset >= len(lines): + return None + return lines[offset:] except: return ('No log available', ) |