Fix version output when missing.
[plcapi.git] / php / methods.py
index 27761a0..621cc91 100755 (executable)
@@ -5,7 +5,8 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2005 The Trustess of Princeton University
 #
-# $Id: methods.py,v 1.3 2006/11/21 20:00:53 mlhuang Exp $
+# $Id$
+# $URL$
 #
 
 import os, sys
@@ -15,6 +16,12 @@ from PLC.API import PLCAPI
 from PLC.Method import *
 from PLC.Auth import Auth
 
+try:
+    set
+except NameError:
+    from sets import Set
+    set = Set
+
 def php_cast(value):
     """
     Casts Python values to PHP values.
@@ -37,8 +44,8 @@ def php_cast(value):
 # Class functions
 api = PLCAPI(None)
 
-api.methods.sort()
-for method in api.methods:
+api.all_methods.sort()
+for method in api.all_methods:
     # Skip system. methods
     if "system." in method:
         continue