Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. wilful::[gsa]> cat gocd.py
  2. #!/usr/sbin/python3
  3.  
  4. from gocd import Server
  5.  
  6. server = Server('https://localhost:8153', user='name', password='***')
  7. pipeline = server.pipeline('Example-Pipeline')
  8. response = pipeline.history()
  9. response.body
  10. wilful::[gsa]> python gocd.py
  11. Traceback (most recent call last):
  12. File "gocd.py", line 3, in <module>
  13. from gocd import Server
  14. File "/home/wilful/git/g-core-labs/gsa/gocd.py", line 3, in <module>
  15. from gocd import Server
  16. ImportError: cannot import name 'Server' from partially initialized module 'gocd' (most likely due to a circular import) (/home/wilful/git/g-core-labs/gsa/gocd.py)
  17. wilful::[gsa]> python -c 'from gocd import Server'
  18. Traceback (most recent call last):
  19. File "<string>", line 1, in <module>
  20. File "/home/wilful/git/g-core-labs/gsa/gocd.py", line 3, in <module>
  21. from gocd import Server
  22. ImportError: cannot import name 'Server' from partially initialized module 'gocd' (most likely due to a circular import) (/home/wilful/git/g-core-labs/gsa/gocd.py)
  23. wilful::[gsa]> cd ..
  24. wilful::[g-core-labs]> python -c 'from gocd import Server'
  25. wilful::[g-core-labs]>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement