Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: third_party/scons/scons-local/SCons/Options/PathOption.py

Issue 17024: Update to SCons 1.2.0. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/scons/scons-local/SCons/Options/PathOption.py
===================================================================
--- third_party/scons/scons-local/SCons/Options/PathOption.py (revision 7505)
+++ third_party/scons/scons-local/SCons/Options/PathOption.py (working copy)
@@ -21,7 +21,7 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
-__revision__ = "src/engine/SCons/Options/PathOption.py 3603 2008/10/10 05:46:45 scons"
+__revision__ = "src/engine/SCons/Options/PathOption.py 3842 2008/12/20 22:59:52 scons"
__doc__ = """Place-holder for the old SCons.Options module hierarchy
@@ -31,5 +31,40 @@
"""
import SCons.Variables
+import SCons.Warnings
-PathOption = SCons.Variables.PathVariable
+warned = False
+
+class _PathOptionClass:
+ def warn(self):
+ global warned
+ if not warned:
+ msg = "The PathOption() function is deprecated; use the PathVariable() function instead."
+ SCons.Warnings.warn(SCons.Warnings.DeprecatedOptionsWarning, msg)
+ warned = True
+
+ def __call__(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable, args, kw)
+
+ def PathAccept(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable.PathAccept, args, kw)
+
+ def PathIsDir(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable.PathIsDir, args, kw)
+
+ def PathIsDirCreate(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable.PathIsDirCreate, args, kw)
+
+ def PathIsFile(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable.PathIsFile, args, kw)
+
+ def PathExists(self, *args, **kw):
+ self.warn()
+ return apply(SCons.Variables.PathVariable.PathExists, args, kw)
+
+PathOption = _PathOptionClass()
« no previous file with comments | « third_party/scons/scons-local/SCons/Options/PackageOption.py ('k') | third_party/scons/scons-local/SCons/Options/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698