Index: tools/push-to-trunk/common_includes.py |
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py |
index a2f0748f509be54ae8c3091b8529793a3787410f..ba23314e070bad39fe71a9b7fc4afb2de1c5b987 100644 |
--- a/tools/push-to-trunk/common_includes.py |
+++ b/tools/push-to-trunk/common_includes.py |
@@ -26,6 +26,7 @@ |
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
+import datetime |
import os |
import re |
import subprocess |
@@ -202,9 +203,12 @@ class SideEffectHandler(object): |
finally: |
url_fh.close() |
- def Sleep(seconds): |
+ def Sleep(self, seconds): |
time.sleep(seconds) |
+ def GetDate(self): |
+ return datetime.date.today().strftime("%Y-%m-%d") |
+ |
DEFAULT_SIDE_EFFECT_HANDLER = SideEffectHandler() |
@@ -286,6 +290,9 @@ class Step(object): |
cmd = lambda: self._side_effect_handler.ReadURL(url) |
return self.Retry(cmd, retry_on, wait_plan) |
+ def GetDate(self): |
+ return self._side_effect_handler.GetDate() |
+ |
def Die(self, msg=""): |
if msg != "": |
print "Error: %s" % msg |