Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python-zeroconf/python-zeroconf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: jmpcm/python-zeroconf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 15, 2018

  1. Modify ServiceInfo's __init__ properties' default value.

    This commit modifies the default value of the argument properties of
    ServiceInfo’s __init__() to byte array (properties=b’’). This enables
    to instantiate it without setting the properties argument. As it is,
    and because properties is not mandatory, if a user does not specify
    the argument, an exception (AssertionError) is thrown:
    
    Traceback (most recent call last):
      File "src/zeroconf-test.py", line 72, in <module>
        zeroconf.register_service(service)
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 1864, in register_service
        self.send(out)
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 2091, in send
        packet = out.packet()
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 1026, in packet
        overrun_answers += self.write_record(answer, time_)
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 998, in write_record
        record.write(self)
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 579, in write
        out.write_string(self.text)
      File "/home/jmpcm/zeroconf-test/src/zeroconf.py", line 903, in write_string
        assert isinstance(value, bytes)
    AssertionError
    
    The argument can be either a dictionary or a byte array. The function
    _set_properties() will always create a byte array with the user's
    properties. Changing the default value to a byte array, avoids the
    conversion to byte array and avoids the exception.
    jmpcm committed Nov 15, 2018
    Configuration menu
    Copy the full SHA
    0111e11 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2018

  1. Configuration menu
    Copy the full SHA
    63cdbe5 View commit details
    Browse the repository at this point in the history
Loading