Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1327

Add the is_frozen decorator

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0.0
    • Component/s: Framework

      Description

      There is a check in several places about the application frozen state: "if not frozen, then do nothing, else continue".

      To ease the handling of those calls and to have less code to write, we could add a decorator if_frozen.

      For instance, this code:

      def foo():
          if not Options.is_frozen:
              return
          # Do something
      

      Will be turned into this more readable code:

      @if_frozen
      def foo():
          # Do something
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h