mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 02:44:21 +02:00
Allow nginx parser to handle empty file (#8895)
* Allow parsing empty files * add unit test * lint * update parser_test * Update configurator_test * update changelog
This commit is contained in:
@@ -9,7 +9,6 @@ from pyparsing import Combine
|
||||
from pyparsing import Forward
|
||||
from pyparsing import Group
|
||||
from pyparsing import Literal
|
||||
from pyparsing import OneOrMore
|
||||
from pyparsing import Optional
|
||||
from pyparsing import QuotedString
|
||||
from pyparsing import Regex
|
||||
@@ -57,7 +56,7 @@ class RawNginxParser:
|
||||
block_innards = Group(ZeroOrMore(contents) + space).leaveWhitespace()
|
||||
block << block_begin + left_bracket + block_innards + right_bracket
|
||||
|
||||
script = OneOrMore(contents) + space + stringEnd
|
||||
script = ZeroOrMore(contents) + space + stringEnd
|
||||
script.parseWithTabs().leaveWhitespace()
|
||||
|
||||
def __init__(self, source):
|
||||
|
||||
Reference in New Issue
Block a user