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

Not python3 compatible #4

Open
zachfi opened this issue Jul 27, 2016 · 0 comments
Open

Not python3 compatible #4

zachfi opened this issue Jul 27, 2016 · 0 comments

Comments

@zachfi
Copy link

zachfi commented Jul 27, 2016

  • 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant