diff options
author | mkaay <mkaay@mkaay.de> | 2009-11-26 22:05:11 +0100 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2009-11-26 22:05:11 +0100 |
commit | 523e2857c47cdef1da6b43523bcf7871ed9e1d63 (patch) | |
tree | d70f49afb347c656e90050497a07711cb382f61d /pyLoadCli.py | |
parent | basic curses cli (diff) | |
download | pyload-523e2857c47cdef1da6b43523bcf7871ed9e1d63.tar.xz |
complete new file_list, cleaned up
Diffstat (limited to 'pyLoadCli.py')
-rwxr-xr-x | pyLoadCli.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pyLoadCli.py b/pyLoadCli.py index 186281e32..2a03c8e59 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -1,5 +1,26 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- + +""" + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, see <http://www.gnu.org/licenses/>. + + @author: mkaay + @version: v0.3 +""" + +SERVER_VERSION = "0.3" + import curses, traceback, string, os from time import sleep, time import xmlrpclib @@ -53,7 +74,10 @@ class pyLoadCli: def connect(self, server_url): self.lock.acquire() self.proxy = xmlrpclib.ServerProxy(server_url, allow_none=True) + server_version = self.proxy.get_server_version() self.lock.release() + if not server_version == SERVER_VERSION: + raise Exception("server is version %s client accepts version %s" % (server_version, SERVER_VERSION)) def refresh(self): self.lock.acquire()
|