From 523e2857c47cdef1da6b43523bcf7871ed9e1d63 Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 26 Nov 2009 22:05:11 +0100 Subject: complete new file_list, cleaned up --- pyLoadCli.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'pyLoadCli.py') 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 . + + @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() -- cgit v1.2.3