Permalink
Browse files

Merge branch '1.0'

Conflicts:
	fabfile/__init__.py
  • Loading branch information...
bitprophet committed Jun 24, 2011
2 parents 7aff0af + 6f8a80a commit 594211bdbff3e0daa91ff26e3350ef8126d348c3
Showing with 27 additions and 1 deletion.
  1. +10 −0 docs/changes/0.9.7.rst
  2. +4 −0 docs/changes/1.0.2.rst
  3. +13 −1 fabric/network.py
View
@@ -0,0 +1,10 @@
+========================
+Changes in version 0.9.7
+========================
+
+The following changes were implemented in Fabric 0.9.7:
+
+Bugfixes
+========
+
+* :issue:`329`: `~fabric.operations.reboot` would have problems reconnecting post-reboot (resulting in a traceback) if ``env.host_string`` was not fully-formed (did not contain user and port specifiers.) This has been fixed.
View
@@ -2,6 +2,10 @@
Changes in version 1.0.2
========================
+.. note::
+ This release also includes all applicable changes from the :doc:`0.9.7
+ release </changes/0.9.7>`.
+
Bugfixes
========
View
@@ -68,9 +68,14 @@ def __getitem__(self, key):
# Return the value either way
return dict.__getitem__(self, real_key)
+ def __setitem__(self, key, value):
+ return dict.__setitem__(self, normalize_to_string(key), value)
+
def __delitem__(self, key):
- return dict.__delitem__(self, join_host_strings(*normalize(key)))
+ return dict.__delitem__(self, normalize_to_string(key))
+ def __contains__(self, key):
+ return dict.__contains__(self, normalize_to_string(key))
def normalize(host_string, omit_port=False):
"""
@@ -127,6 +132,13 @@ def join_host_strings(user, host, port=None):
return "%s@%s%s" % (user, host, port_string)
+def normalize_to_string(host_string):
+ """
+ normalize() returns a tuple; this returns another valid host string.
+ """
+ return join_host_strings(*normalize(host_string))
+
+
def connect(user, host, port):
"""
Create and return a new SSHClient instance connected to given host.

0 comments on commit 594211b

Please sign in to comment.