~ubuntu-branches/ubuntu/precise/aptdaemon/precise

« back to all changes in this revision

Viewing changes to aptdaemon/enums.py

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2011-11-18 12:03:22 UTC
  • mfrom: (1.3.15)
  • Revision ID: package-import@ubuntu.com-20111118120322-x0ffrgyrrc7ku8lm
Tags: 0.43+bzr703-0ubuntu1
* New bzr snapshot:
  - Merge the AddLicenseKey method
  - Replace the backported unittest2 framework by the native one of
    Python 2.7 and Nose to collect the tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
           "ERROR_PACKAGE_MANAGER_FAILED", "ERROR_CACHE_BROKEN",
36
36
           "ERROR_PACKAGE_UNAUTHENTICATED", "ERROR_INCOMPLETE_INSTALL",
37
37
           "ERROR_UNREADABLE_PACKAGE_FILE", "ERROR_INVALID_PACKAGE_FILE",
 
38
           "ERROR_LICENSE_KEY_INSTALL_FAILED",
 
39
           "ERROR_LICENSE_KEY_DOWNLOAD_FAILED",
38
40
           "ERROR_UNKNOWN",
39
41
           "STATUS_SETTING_UP", "STATUS_WAITING", "STATUS_WAITING_MEDIUM",
40
42
           "STATUS_WAITING_CONFIG_FILE_PROMPT", "STATUS_WAITING_LOCK",
48
50
           "ROLE_REMOVE_VENDOR_KEY", "ROLE_FIX_INCOMPLETE_INSTALL",
49
51
           "ROLE_FIX_BROKEN_DEPENDS", "ROLE_ADD_REPOSITORY",
50
52
           "ROLE_ENABLE_DISTRO_COMP", "ROLE_CLEAN", "ROLE_RECONFIGURE",
 
53
           "ROLE_ADD_LICENSE_KEY",
51
54
           "DOWNLOAD_DONE", "DOWNLOAD_AUTH_ERROR", "DOWNLOAD_ERROR",
52
55
           "DOWNLOAD_FETCHING", "DOWNLOAD_IDLE", "DOWNLOAD_NETWORK_ERROR",
53
56
           "PKG_INSTALLING", "PKG_CONFIGURING", "PKG_REMOVING",
143
146
ERROR_UNREADABLE_PACKAGE_FILE = "error-unreadable-package-file"
144
147
#: The package file violates the Debian/Ubuntu policy
145
148
ERROR_INVALID_PACKAGE_FILE = "error-invalid-package-file"
 
149
#: The license key download failed
 
150
ERROR_LICENSE_KEY_DOWNLOAD_FAILED = "error-license-key-download-failed"
 
151
#: The license key is invalid
 
152
ERROR_LICENSE_KEY_INSTALL_FAILED = "error-license-key-install-failed"
146
153
#: An unknown error occured. In most cases these are programming ones.
147
154
ERROR_UNKNOWN = "error-unknown"
148
155
 
253
260
ROLE_RECONFIGURE = "role-reconfigure"
254
261
#: The transaction will remove all downloaded package files.
255
262
ROLE_CLEAN = "role-clean"
 
263
#: The transaction will add a license key to the system
 
264
ROLE_ADD_LICENSE_KEY = "role-add-license-key"
256
265
 
257
266
# DOWNLOAD STATES
258
267
#: The download has been completed.
434
443
    ROLE_ENABLE_DISTRO_COMP: _("Enabling component of the distribution failed"),
435
444
    ROLE_CLEAN: _("Removing downloaded package files failed"),
436
445
    ROLE_RECONFIGURE: _("Removing downloaded package files failed"),
 
446
    ROLE_ADD_LICENSE_KEY: _("Adding license key"),
437
447
    ROLE_UNSET: ""
438
448
    }
439
449
 
507
517
                                  "on your computer. Please contact the person "
508
518
                                  "or organisation who provided this package "
509
519
                                  "file and include the details beneath."),
 
520
    ERROR_LICENSE_KEY_INSTALL_FAILED: _("The downloaded license key which is "
 
521
                                        "required to run this piece of "
 
522
                                        "software is not valid or could not "
 
523
                                        "be installed correctly.\n"
 
524
                                        "See the details for more "
 
525
                                        "information."),
 
526
    ERROR_LICENSE_KEY_DOWNLOAD_FAILED: _("The license key which allows you to "
 
527
                                         "use this piece of software could not be "
 
528
                                         "downloaded. Please check your "
 
529
                                         "network connection."),
510
530
    }
511
531
 
512
532
def get_error_description_from_enum(enum):
542
562
    ERROR_INCOMPLETE_INSTALL: _("Previous installation hasn't been completed"),
543
563
    ERROR_INVALID_PACKAGE_FILE: _("The package is of bad quality"),
544
564
    ERROR_UNREADABLE_PACKAGE_FILE: _("Package file could not be opened"),
 
565
    ERROR_LICENSE_KEY_DOWNLOAD_FAILED: _("Failed to download the lincese key"),
 
566
    ERROR_LICENSE_KEY_INSTALL_FAILED: _("Failed to install the lincese key"),
545
567
    ERROR_UNKNOWN : _("An unhandlable error occured")
546
568
    }
547
569