Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Not python3 compatible #4

@zachfi

Description

@zachfi
  • printing strings should use the print() function
  • xrange should be renamed to range()

Also:

Traceback (most recent call last):
  File "./check_bacula_client.py", line 98, in <module>
    main(sys.argv)
  File "./check_bacula_client.py", line 61, in main
    if child.expect_list([re.compile(r'Terminated Jobs:'), re.compile(r'Error: Client resource .* does not exist.'), pexpect.TIMEOUT]):
  File "/opt/monitoring/lib/python3.4/site-packages/pexpect/spawnbase.py", line 339, in expect_list
    return exp.expect_loop(timeout)
  File "/opt/monitoring/lib/python3.4/site-packages/pexpect/expect.py", line 89, in expect_loop
    idx = self.new_data(incoming)
  File "/opt/monitoring/lib/python3.4/site-packages/pexpect/expect.py", line 19, in new_data
    index = searcher.search(incoming, freshlen, self.searchwindowsize)
  File "/opt/monitoring/lib/python3.4/site-packages/pexpect/expect.py", line 284, in search
    match = s.search(buffer, searchstart)
TypeError: can't use a string pattern on a bytes-like object

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions