Commit 89a78bad by Csók Tamás

cloud.py: correction in exception handling; get-pip.py: pip installer for windows

parent 2d8c393f
...@@ -93,10 +93,9 @@ class Browser: ...@@ -93,10 +93,9 @@ class Browser:
vm.protocol = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(1) > td").text vm.protocol = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(1) > td").text
vm.host,vm.port = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(2) > td").text.split(':') vm.host,vm.port = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(2) > td").text.split(':')
vm.user = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(4) > td").text vm.user = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(4) > td").text
driver.find_element_by_css_selector("a[href*='/logout/']").click()
except: except:
print "Browser session timed out!" print "Browser session timed out!"
finally:
driver.find_element_by_css_selector("a[href*='/logout/']").click()
return vm return vm
## ##
...@@ -125,10 +124,9 @@ class Browser: ...@@ -125,10 +124,9 @@ class Browser:
vm.protocol = "RDP" vm.protocol = "RDP"
vm.host, vm.port = cl[1].split(":") vm.host, vm.port = cl[1].split(":")
vm.user, vm.password = cl[3], cl[5] vm.user, vm.password = cl[3], cl[5]
driver.find_element_by_css_selector("a[href*='/logout/']").click()
except: except:
print "Browser session timed out!" print "Browser session timed out!"
finally:
driver.find_element_by_css_selector("a[href*='/logout/']").click()
return vm return vm
## ##
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -93,10 +93,9 @@ class Browser: ...@@ -93,10 +93,9 @@ class Browser:
vm.protocol = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(1) > td").text vm.protocol = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(1) > td").text
vm.host,vm.port = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(2) > td").text.split(':') vm.host,vm.port = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(2) > td").text.split(':')
vm.user = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(4) > td").text vm.user = driver.find_element_by_css_selector("#vm-credentials > div > table > tbody > tr:nth-child(4) > td").text
driver.find_element_by_css_selector("a[href*='/logout/']").click()
except: except:
print "Browser session timed out!" print "Browser session timed out!"
finally:
driver.find_element_by_css_selector("a[href*='/logout/']").click()
return vm return vm
## ##
...@@ -125,10 +124,9 @@ class Browser: ...@@ -125,10 +124,9 @@ class Browser:
vm.protocol = "RDP" vm.protocol = "RDP"
vm.host, vm.port = cl[1].split(":") vm.host, vm.port = cl[1].split(":")
vm.user, vm.password = cl[3], cl[5] vm.user, vm.password = cl[3], cl[5]
driver.find_element_by_css_selector("a[href*='/logout/']").click()
except: except:
print "Browser session timed out!" print "Browser session timed out!"
finally:
driver.find_element_by_css_selector("a[href*='/logout/']").click()
return vm return vm
## ##
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment