Current Path : /usr/lib/python2.7/dist-packages/landscape/ |
Current File : //usr/lib/python2.7/dist-packages/landscape/patch.pyc |
Tc @ sh d d l Z d e f d YZ d e f d YZ d e f d YZ d e f d YZ d S( iNt UpgraderConflictc B s e Z d Z RS( s9 Two upgraders with the same version have been registered.( t __name__t __module__t __doc__( ( ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyR s t UpgradeManagerBasec B s2 e Z d Z d Z d Z d Z d Z RS( s A simple upgrade system.c C s i | _ d S( N( t _upgraders( t self( ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyt __init__ s c C sC | | j k r2 t d | | j | | f n | | j | <d S( sN @param version: The version number that this upgrader is upgrading the database to. This defines the order that upgraders are run. @param function: The function to call when applying upgraders. It must take a single object, the database that is being upgraded. s- %s is already registered as %s; not adding %sN( R R ( R t versiont function( ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyt register_upgrader s c C s# | j j } | r t | Sd S( sp Get the 'current' version of any database that this UpgradeManager will be applied to. i ( R t keyst max( R R ( ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyt get_version s c s f d } | S( s A decorator for specifying that a function is an upgrader for this upgrade manager. @param version: The version number that the function will be upgrading to. c s j | | S( N( R ( R ( R R ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyt inner/ s ( ( R R R ( ( R R s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyt upgrader' s ( R R R R R R R ( ( ( s3 /usr/lib/python2.7/dist-packages/landscape/patch.pyR s t UpgradeManagerc B s e Z d Z d Z RS( c C s | j d s"