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

Fix INI option not converted to revelant type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.5.9
    • Fix Version/s: 3.0
    • Component/s: Configuration
    • Tags:
    • Story Points:
      2

      Description

      Content of the file {~/.nuxeo-drive/config.ini}:

      [DEFAULT]
      env = test
      
      [test]
      delay = 3
      

      Starting Drive will fail with that error:

      Traceback (most recent call last):
        File "nuxeo-drive-client/nxdrive/commandline.py", line 631, in <module>
          sys.exit(main())
        File "nuxeo-drive-client/nxdrive/commandline.py", line 627, in main
          return CliHandler().handle(argv)
        File "nuxeo-drive-client/nxdrive/commandline.py", line 414, in handle
          options = self.parse_cli(argv)
        File "nuxeo-drive-client/nxdrive/commandline.py", line 330, in parse_cli
          self.load_config(parser)
        File "nuxeo-drive-client/nxdrive/commandline.py", line 373, in load_config
          Options.update(args, setter='local')
        File "/home/tiger-222/projects/nuxeo-drive/nuxeo-drive-client/nxdrive/options.py", line 292, in update
          item, value, setter=setter, fail_on_error=fail_on_error)
        File "/home/tiger-222/projects/nuxeo-drive/nuxeo-drive-client/nxdrive/options.py", line 257, in set
          item, type(new_value).__name__, type(old_value).__name__))
      TypeError: The value of the option 'delay' is of type unicode, while int is required.
      

      The cause if that the INI confg parser does convert all values to unicode instead of using the good type (integer in that case).

        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 - 30 minutes
                30m